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
| Parameter | Type | Description |
|---|---|---|
connection | Connection | Connection returned by getconnections. |
Returns
| Type | Description |
|---|---|
boolean | Whether 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.
