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.

Syntax
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.

Function parameters
ParameterTypeDescription
...argsanyValues 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

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()
Kawaii documentation