ReferenceSignals

isgamescriptconnection

Checks whether a connection belongs to game-script code rather than submitted Apex code.

Syntax

isgamescriptconnection(connection: Connection) -> boolean

Also available as

is_game_script_connection

Parameters

ParameterTypeDescription
connectionConnectionConnection returned by getconnections.

Returns

TypeDescription
booleanWhether this is a game-script connection.

Description

This reports connection ownership; it does not imply that its callback is callable from the current state. Inspect ForeignState or getconnectionfunction separately.

Example

local event = Instance.new("BindableEvent")
event.Event:Connect(function() end)
print(isgamescriptconnection(getconnections(event.Event)[1]))
event:Destroy()

These are Game executor contracts. Check build requirements and session lifetimes before using them.