Network
A userdata object representing a network object.
Kind: API page
Environments: Game
Game
Network is used for sending data between scripts running on server and client. This allows the server to call a function on the client with optional arguments, and vice versa.
Note: A network object is accessable via
self.networkin scripted shapes (see ShapeClass).Warning: Network allows any Lua data to be sent between the host and other players in real-time. This may result in high latency and lag in multiplayer. To avoid lag and minimize bandwidth usage, consider only sending data when necessary, when data has changed, and attempt to send as little amount of data as possible.