In my game, I'm going to have time-based rounds. Obviously, I can just send an event from the server to all clients a few times per second and tell them what the current round time is, but this feels inefficient and also is delayed by ping. Is there a better way?

What I'm trying to do:

  • send the start time of the round once to the clients in-game and any that join
  • clients will countdown the round locally since they have what time the round started
  • no events telling players the current time

At first I thought about using tick(), but it's time zone dependent. os.time() isn't timezone dependent, but apparently it can differ by a few seconds on systems. I also tried distributed game time, but this is just the time since the player connected on the clients.

To end the round, I'd just fire an event to double check that the clients know its the end of the round.

1 comment

0

A NumberValue in ReplicatedStorage that's controlled by a Script in ServerScriptService and a LocalScript that is run on the client to track it.