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
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
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.
1 comment
print(20-i)