Events
Learn what events are and what they offer on Zyntex.
Events are a crucial Zyntex feature. They allow you to send a payload to either a Roblox server (or all servers) or to the Dashboard.
Use cases
- Live Events: If you need to activate a live event across all servers, Zyntex Events makes that super simple.
- Session Recap: Send a session recap for each player, which includes information such as how many levels they progressed and how many chests they opened.
- Discord Webhook: You can set up events to automatically send a Discord webhook when they are invoked.
- Advanced Live Graphs: Draw beautiful graphs as soon as invocations come in to properly analyze your data. By default, each event fires a live notification to all admins focused on your game in the dashboard
Creating an event
To create an event, navigate to the Events tab in the Zyntex dashboard after selecting a game. On this tab, you can see all active and deleted events. To create a new event, click + New Event at the end of the event list. You will be prompted to enter the event’s name, description, data structure, and whether it should be have a sender lock.
Event creation has limits. Here are the plan-specific limits:
- Free Plan: 1 event
- Standard Plan: 15 events
- Enterprise: 100 events
You will be notified by email if you reach your event limit.
Sender lock
The sender lock is a “lock” on who can invoke the event. If set to web
, only the dashboard can invoke the event. If set to roblox
, only Roblox servers can invoke the event. If set to none
, both the dashboard and Roblox server can invoke the event.
This allows you to structure your events in a way that makes sense for your game.
Discord Webhooks
To set up a Discord webhook for an event, navigate to that event’s page in the Zyntex dashboard and click on the Discord Webhook tab. To the right, in the Details section, you can click Click to edit below Webhook URL to set up a webhook URL. Currently, Zyntex supports Discord webhooks only, but we plan to add support for other webhook providers in the future.
Invoking an event
To invoke an event from the Dashboard, navigate to the event’s page and click the Invoke button under the page’s header.
Deleting an event
If you delete an event, it will no longer be available for invocation. However, you can still view the event’s history and data in the dashboard.
SDK Integration
Getting an Event
To get an event in the Zyntex Roblox SDK, you can use the Zyntex:GetEvent
method. This method takes the event’s name as an argument and returns an event object.
Listening to an Event
To listen to an Event
, you can use the Event:Connect
method. This method takes a callback function as an argument, which will be called whenever the event is invoked.
The callback function receives an Invocation
object, which contains all of the invocation’s data, such as the invocation ID, payload, and sender.
Invocation
object is only a data structure and does not have any methods. It is used to access the data of the invocation.Invoking an Event
To invoke an event, you can use the Event:Invoke
method. This method takes a table of key-value pairs as an argument, which will be sent as the event’s payload.