Countdown timer

Hello! I came to the forums for a scripting question on how I would make a timer.

  1. A custom countdown clock The reason I want a custom countdown clock is for such reasons as, a community event, group event, giveaway, etc.

  2. What should I do? I’m new to scripting, so if somebody could help me create a script or find one that works well, that would be awesome.

  3. What solutions have you tried so far? I tried finding some countdown scripts and changing them, but the way they are scripted is very confusing considering if you want multiple days and or hours.

6 Likes

could try like

local time = 60
while wait(1) do
if time == 0 then
gui.TextLabel.Text = "Times up!"
break
else
gui.TextLabel.Text = tostring(time) --sets onscreen gui timer
time = time - 1
end
end
14 Likes

This video should help

Live Event

1 Like

Here is a post that explains how to go about making a live countdown:

8 Likes

Would I put this script in workspace or where would I put it?

1 Like

ServerScriptService

30 charsss

1 Like

As this is very confusing, here’s why I calculated as the epoch time for my servers. 1595733300 would I subtract the current epoch time from that?

1 Like

The video just covers everything, have you watched the full thing?

1 Like

Yes, but I will have to figure out how to create my own script with os.time.

just make a function called liveEvent() and put whatever code you want to run when the live event starts (for example lava rising)

then make a variable timeToStart and make it’s value the time you want it to start in epoch time, so use an epoch converter for that

then make a variable timeToStop so when a new server starts up after this time it will not run but if it has not hit this time it will still run

then make a while wait(1) do
then make a variable local time = os.time()
then do if time >= timeToStop then the epoch time has exceeded the timeToStop so then you just write break inside

then do a if time >= timeToStart then
run the function liveEvent()
then write break
end
end

Please tell me if it doesn't work

Well, because I know absolutely nothing about scripting, this makes barely any sense.

How I learned to script was to watch other people’s videos on them making games and I just followed along and after doing lots of them I just learned how to do it myself

I recommend you do this too

For now just do my script

1 Like

Which one? BindableFunction or RemoteFunction?

2 Likes

It is not a BindableFunction or a RemoteFunction, it is just a function in a script

To create one do this

function liveEvent()
the code when the live event starts (look at other posts to learn how to make something like lava rising or rockets firing or fireworks)
end

To actually run it you need to call it like this

liveEvent()

you run this code in the if statement

1 Like