Skip to main content

Events

The Events system is the primary communication mechanism in HELIX. It enables structured data transfer between the client and server using global registration and triggering functions. Events support strings, numbers, booleans, nil, vectors, and tables as arguments.

tip

The triggering controller is passed automatically as the first parameter when a client triggers a server event -- similar to how source is passed in FiveM.


Core Functions

FunctionParametersAuthorityDescription
RegisterClientEventname: string, callback: functionClientRegisters a client-side event handler. Called when the server triggers an event targeted at this client.
RegisterServerEventname: string, callback: functionServerRegisters a server-side event handler. The triggering player controller is automatically passed as the first argument.
TriggerClientEventcontroller: PlayerController, name: string, ...args: anyServerSends an event from the server to a specific client. All extra arguments are serialized and passed to the client handler.
TriggerLocalClientEventname: string, ...args: anyClientSends an event from a client script to another client-side Lua package on the same client.
TriggerServerEventname: string, ...args: anyClientSends an event from the client to the server. The triggering controller is passed automatically as the first argument to the server handler.
TriggerLocalServerEventname: string, ...args: anyServerSends an event from a server script to another server-side Lua package, enabling cross-package communication without client involvement.
BroadcastEventname: string, ...args: anyServerSends an event from the server to all connected clients.

Examples

Registering and Triggering Events

Blueprint Register and Trigger Client EventScroll to zoom · Drag to pan · Drag nodes to move
Event Dispatcher TestClientStringNumberBooleanPrint StringIn String

Server-Side Event Handling

Blueprint Server Event Handler with ResponseScroll to zoom · Drag to pan · Drag nodes to move
Event Dispatcher TestServerControllerStringNumberPrint StringIn StringTrigger Client EventControllerEvent Name"TestClient"Args

Cross-Package Communication

Blueprint Cross-Package Event CommunicationScroll to zoom · Drag to pan · Drag nodes to move
Custom Event SendLocalTrigger Local Client EventEvent Name"TestClient"Args"Hello"Trigger Local Server EventEvent Name"TestServer"Args"Cross-package data"

caution

Events send data over the network. Supported argument types include strings, numbers, booleans, nil, vectors, and tables. Function references and complex objects cannot be sent remotely.