Skip to content
Untitled Sandbox - Developer Documentation
docs/types/Signal

Signal<T>

A message that one script sends and other scripts receive, which you create with signals.define.

Fields

namestring

Events

receivedEvent<(T)>

You listen to these with :connect, which the Event page covers.

Signal:fire

method

Sends a value to every script listening to the Signal, after checking it fits the schema.

Signal:fire(payload: T) -> ()
example
scored:fire({ amount = 1 })

Use it fortelling your other scripts that a goal was scored or a boss was defeated.

payloadThe value to send. It must fit the Signal's schema.
↑ ↓ moveEnter openEsc close