Signal:Fire Asynchronous

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

Deliver an event to this signal’s listeners using the supplied arguments. Use it to publish a change after updating your script’s state. Supply all the values listeners need so they do not have to reach back into the producer.

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 callbacks and waiting coroutines, in order.

Returns

()

This function returns no values.

Usage notes

Callbacks are invoked synchronously and may yield. Account for callback work when deciding where to fire the signal.

Example

Example
Luau
local changed = Signal.new()
changed:Connect(function(name, value)
    print(name .. " is now " .. tostring(value))
end)
changed:Fire("volume", 0.75)
changed:Destroy()
Kawaii documentation