Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

For a round clock timer, how should I code this on client or the server?

Asked by 5 years ago

For it to be the safest and most efficient without down the game, should I code it all on the server then update everyone's clock(Player Gui) individually from the server via a for loop?

Or should the server have a uniform clock value that's constantly changing, and the client updates it's own gui every second by communicating with the server?

3
have an int value in replicated storage, change it on the server and get it on the client theking48989987 2147 — 5y
0
The king, wouldn't that be bad because leaving the int value in replicated storage could leave it open for hackers? illumines 14 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

There is nothing "unsafe" for a clock timer. There is no point of having the server update the time for all the clients, this would just make the game impress less due to inconsistent changing of the time.

You can simply just have the server send the countdown number to the client and make the client do a for loop from the given number to 0. Then once x seconds has passed, get the server to update the clients again with new information.

(Don't make the server do unnecessary stuff is what I tell myself.)

Ad

Answer this question