Signal:Fire Asynchronous

  • KawaiiSignal:Fire
  • PsmSignal:Fire
  • VoltSignal:Fire

Send an event to the callbacks and coroutines waiting on a custom Signal. Use it after your script changes state that subscribers need to know about.

Syntax
Luau
Signal:Fire(...args: any) -> ()

Parameters

Call this method with a Signal receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

Function parameters
ParameterTypeDescription
...argsanyValues delivered to every current listener and waiter.

Returns

()

No values.

Usage notes

Connected callbacks run synchronously in registration order and may yield. Waiting coroutines resume through task.spawn. Fire raises if the signal has been destroyed.

Example

Example
Luau
local healthChanged = Signal.new()
healthChanged:Connect(function(health)
    print("Health is now", health)
end)
healthChanged:Fire(75)
healthChanged:Destroy()
Kawaii documentation