CommChannel: Fire Asynchronous
CommChannel:fire
Send an event through a communication channel to its connected listeners. It is handy for one-way notifications between scripts or states.
Luau
CommChannel:Fire(...args: any) -> ()Parameters
Call this method with a CommChannel receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
| Parameter | Type | Description |
|---|---|---|
...args | any | Values delivered to the channel listeners. |
Returns
()No value.
Example
Luau
local _, channel = create_comm_channel()
local connection = channel:Connect(function(status)
print("Status:", status)
end)
channel:Fire("ready")
connection:Disconnect()