Server

Server is not creatable, there's only one instance of it. It can only be accessed through its globally exposed variable.

The Server acts as a host and director for the game.

For example, if your game requires a minimum amount of players, it's a good idea to use the Server to count and trigger game start.

⚠️ Multiplayer has been turned off in the first beta versions. It will be back soon, and this page will be updated with more details.

Properties

Executed ~30 times per second. Provides the elapsed time in seconds as parameter.

-- executed ~30 times per second on each user device
Server.Tick = function(dt)
  print("elapsed:", dt, "seconds")
end