Skip to content
Signals & connectionsOverviewNew · 0.744

getconnectionthread

Describe the coroutine associated with a connection.

Details#

Returns a connection's Thread when it is an available coroutine, otherwise nil. A missing thread does not imply that the connection is invalid or disconnected.

Examples#

Example

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