Signal.new
Creates an Apex-owned signal.
Syntax
Signal.new() -> Signal
Returns
| Type | Description |
|---|---|
Signal | New signal object. |
Description
Use Connect or Once to register listeners, Fire to deliver values, and Wait to yield for the next delivery. Arguments preserve their order, including nil positions. This is a local communication object, not a server-replicated event. DisconnectAll removes all listeners and pending waiters.
Example
local signal = Signal.new()
signal:Connect(function(value) print(value) end)
signal:Fire("hello")
signal:DisconnectAll()
These are Game executor contracts. Check build requirements and session lifetimes before using them.
