Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a countdown timer[Unanswered]?

This is what I have got so far but it doesn't countdown.

for i= 1,20 do
	wait(1)
	print(i)
script.Parent.Text= i
end

1 comment

0

print(20-i)

1 answer

You're very close. It turns out, there is a way to make for loop count down instead of up. You use the third, optional argument, which is how much is added to i each time the for loop runs. By default, this is 1. But if we set it to -1, it will cause the loop to count down.

for i = 20,1,-1 do
	--code
end

This discussion is preserved as it was. New answers, comments, and votes are closed.