Skip to content

NetworkEvent

Inherits Instance

NetworkEvents are events that can be called to communicate between server and client. NetMessages are the class used for sharing data between server and client when sending NetworkEvents.

Properties

Reliable : boolean

Determines if this network event should send messages reliably. Recommended to be off if you're passing lot of data that doesn't need to arrive reliably.

Methods

InvokeServer → nil

Parameters

msg [ NetMessage ]

_ [ any? ]

Sends a message to the server.

InvokeClient → nil

Parameters

msg [ NetMessage ]

player [ Player ]

Sends a message to a specific client.

InvokeClients → nil

Parameters: msg [ NetMessage ]

Sends a message to all connected clients.

Events

InvokedServer

Parameters

sender [ Player ]

msg [ NetMessage ]

Fires when server receives message from client

InvokedClient

Parameters

sender [ nil ]

msg [ NetMessage ]

Fires when client receives message from server