Signal: Wait Asynchronous
KawaiiSignal:WaitPsmSignal:WaitVoltSignal:Wait
Pause the calling coroutine until the next Fire, then receive that firing’s arguments. This is convenient for a short one-time handoff between script tasks.
Luau
Signal:Wait() -> ...anyParameters
Call this method with a Signal receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
...anyAll values passed to Fire, in order.
Usage notes
Call Wait from a coroutine. Destroying the signal clears pending waiters; it does not deliver a final value to them.
Example
Luau
local ready = Signal.new()
task.spawn(function()
local item, count = ready:Wait()
print(item, count)
end)
task.wait()
ready:Fire("loaded", 3)
ready:Destroy()