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

How can you make a clock tick down even if a player is offline?

Asked by
sydre 229 Moderation Voter
5 years ago

If you where making a building game where everyting had a "Time to build" to it so that a timer would start when the player wanted to build the thing and the building would only get completed when the timer ran out, is there anyway to make the timer go down even when the player is offline?

0
Because of different servers, you can't really do this in a script. Your best option is saving the time they left and how much time was on the clock when they left to a datastore. Then, when they join a new server, do the maths in order to figure out how much time they have left on the clock (if any), and give it to them. User#26971 0 — 5y
0
What do you mean by offline? HomieFirePGN 137 — 5y
0
so basiclly storing the os.time() when the player leave and then do some math to figure out the time thta have paset, ok sydre 229 — 5y

Answer this question