signal:Wait
Yields until the next delivery of an Apex-owned signal.
Syntax
signal:Wait() -> ...any
Returns
| Type | Description |
|---|---|
...any | Arguments from the next delivery. |
Description
Returns the arguments supplied to Fire, including nil positions. A delivery that happened before Wait is not replayed. Do not block the only task that could produce the event.
Example
local signal = Signal.new()
task.defer(function() signal:Fire("hello", 42) end)
local message, value = signal:Wait()
print(message, value)
These are Game executor contracts. Check build requirements and session lifetimes before using them.
