ReferenceSignals

getconnectionthread

Returns the connection’s accessible owner thread.

Syntax

getconnectionthread(connection: Connection) -> thread?

Also available as

get_connection_thread

Parameters

ParameterTypeDescription
connectionConnectionConnection object to inspect.

Returns

TypeDescription
thread?Current connection thread.

Description

This is the function-call counterpart of reading Thread from a connection returned by getconnections. Native or foreign-state connections may not expose local callback values.

Example

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

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