NativeSignal: Fire Synchronous
Forward values through a Kawaii runtime event object. This is mainly useful when manually exercising listeners of an event supplied by another API.
Luau
NativeSignal:Fire(...args: any) -> ()Parameters
Call this method with a NativeSignal receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
| Parameter | Type | Description |
|---|---|---|
...args | any | Values forwarded to listeners of this runtime event. |
Returns
()No values.
Usage notes
The underlying event is invoked synchronously; the owning API controls how its listeners are scheduled. This does not send a WebSocket frame. Use WebSocket:Send for network traffic.
Example
Luau
local socket = WebSocket.connect("wss://echo.websocket.events")
socket.OnMessage:Connect(function(message)
print("Preview:", message)
end)
socket.OnMessage:Fire("local preview")
socket:Close()