API reference
Signals
Events and their connections.
RBXScriptSignal
An event: RunService.Heartbeat, Players.PlayerAdded, ... Handlers run as threads of the script that connected them and stop with it.
3 entries
RBXScriptSignal:Connect(handler) -> RBXScriptConnectionCalls handler with the signal's arguments every time it fires.
Arguments
| Name | Type | Description |
|---|---|---|
handler | function |
Returns
RBXScriptConnection
Example
Luau
local conn = RunService.Heartbeat:Connect(function(dt) end)RBXScriptSignal:Once(handler) -> RBXScriptConnectionLike Connect, for the next firing only.
Arguments
| Name | Type | Description |
|---|---|---|
handler | function |
Returns
RBXScriptConnection
RBXScriptSignal:Wait() -> ...anyYields until the signal fires and returns its arguments.
Returns
...any
Example
Luau
local char = player.CharacterAdded:Wait()RBXScriptConnection:Disconnect()Stops calling the handler.
Example
Luau
conn:Disconnect()false once disconnected.
Returns
boolean