Skip to content
Signals & connectionsOverviewNew · 0.744

isgamescriptconnection

Describe a connection's relationship to the current script environment.

Details#

Returns LuaConnection and not ForeignState for the supplied connection facade. Despite the name, it is this metadata classification rather than proof of a handler's source script.

Examples#

Example

Luau
local event = Instance.new("BindableEvent")
local own = event.Event:Connect(print)
local connection = getconnection(event.Event, 1)
if connection then print(isgamescriptconnection(connection)) end
own:Disconnect()
event:Destroy()