So, I’m coming up on the date that I wish to release my new game, “During Midnight” and I wanted to make a countdown clock in my other game just to hype the players that play “House Party” up a bit before the release!
So I thought for a bit about how I was going to go about this and realized I have no clue on where to start. I was thinking of using os.time(), however, that would require a datastore (I think) just to keep track of when the timer started.
So, Here’s were the developer forums come in - is there a simplistic way to make a game-wide countdown without using datastore? (I don’t really know how to use JSONDecode() or what have you, I am a pretty new coder in terms of heavy duty services )
If not, I guess I will take the route of storing the os.time() and then calculating how much time until the day of release.
Another and last edit :
I just got on pc so I can explain this better, what I meant by hardcoding is you’d do os.time() like right now and save the value in a variable, then on each new server you’d do :
local start = os.time() -- your hardcoded seconds/os.time()
local whereToEnd = start + When you want it to end in seconds
start = start + (os.time() - start)
-- with a timer :
while true do
print(start - os.time() + whereToEnd,"seconds left.")
wait(1)
end
and you’d use start as the current count.
Even when using a DataStore if a server starts before the other it’ll have mismatches so I think hardcoding the start time is the best course of action to take in this situation at least.