Countdown Until Release script?

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.

Thanks!

1 Like

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.
image

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.

If anyone has a better way please do reply.

3 Likes

I don’t know why I would need CFrames for using a time script O.o

I think I might just take the datastore route like @BasedFX suggested

1 Like

Yea, I am not that fluent with programming, so you might wanna go with his line. (I use CFrames a lot when I do countdowns.

Why would you use CFrames in countdowns since CFrames are used for rotating and positioning objects in the workspace?

I do not know, I apologize I am really new to programming

I see. No need to apologize, its just a mistake you made and you learned from it, so its all good.

Thank you. I understand now lol.

1 Like