getconnectionfunction
Returns the connection’s accessible Luau callback.
Syntax
getconnectionfunction(connection: Connection) -> function?
Also available as
get_connection_function
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | Connection | Connection object to inspect. |
Returns
| Type | Description |
|---|---|
function? | Current connection callback. |
Description
This is the function-call counterpart of reading Function 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(getconnectionfunction(connection))
event:Destroy()
These are Game executor contracts. Check build requirements and session lifetimes before using them.
