Skip to content


EventPayload. You can create an event option like the following code.
local payload = EventPayload.New({id="abc1234", name="Jerry"})
local content = payload:GetContent()


EventPayload EventPayload.New(table content)

ReturnsThe new event payload.
Creates a new instance of EventPayload. The only parameter content is the object that needs to be sent. Note: When invoking FireToClient, FireToAllClients and FireToServer, the content of EventPayload must be serializable to JSON, that is content must be one of string, number, boolean, table with string keys and table with successive number keys starting from 1.
  • content The object to sent.

table GetContent()

ReturnsThe object to send.
Get the object to send.