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

How do make a GUI timer?

Asked by 10 years ago

I can make one on a hint by doing something like

x = 50 if x >0 then x = x-1 else x = TIMES UP

4 answers

Log in to vote
0
Answered by
Nickoakz 231 Moderation Voter
10 years ago

For a timer counting from 50 to 0. Here you go.

--Start counting.
for a=50,1,-1 do
--Some relayer here like gui.TextLabel.Text=a.." seconds left"
print(a)
wait(1)
end
--Some relayer here like gui.TextLabel.Text="0 seconds left"
print('0')
--What to do after timer hits.
0
This seems like all I need. I can do the rest, thank you! Kazagent 0 — 10y
0
Please give me an Up arrow. Thanks. Nickoakz 231 — 10y
Ad
Log in to vote
0
Answered by 10 years ago
a = 50
for i = 1, 50 do
wait(1) --How ever long, second minutes hours
a = a-1
script.Parent.TextLabel.Text = a
end
Log in to vote
-1
Answered by
Cizox 80
10 years ago
local x = 60
repeat
    wait(1)
    x = x - 1
    script.Parent.Text = x
until x == 0

Put this into a script. Put the script inside a TextBox/TextButton, and the timer should appear on the GUI.

Log in to vote
-4
Answered by 10 years ago

I've been wondering the same thing.

If you don't understand what he means : he means like a gui in a corner, side or so, that says how much time you have left, then once it says TIMES UP, you get teleported to lobby.

0
All of this except the teleportation part. Although that would be kind of nice... Kazagent 0 — 10y

Answer this question