I just copy and pasted my timer. I was hoping there would be a loop or something that I don't know about. My code would go something like this:
function ValueCountDown () NumberValue.Value = 7 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 NumberValue.Value = NumberValue.Value - 1 end)
This is not what I actually use in my script (It actually took up 99 lines of the same line). I'm aware that you can press the arrow on the side to shorten you're function but can someone tell me a loop I can use as well as an example of it.
A For-Loop would be useful
for count = 1,10,1 do -- Code count - count-1 end
The count is just a variable, you name it what ever you want. As a video I watched said-S.E.I. The first 1 is where the number starts, the 10 is where it ends. The last 1 is the increase, the timer will increase by 1. To make it count down backwards you could something like:
for count = 7,0,-1 do -- Code count = count-1 end
If its to fast, just add a wait in the count.
Hope this helps!
You can use repeat loop, but I'd recommend you for loops because you don't need to make a variable. Well it is optional, all depends on you.
for i = NumberValue.Value, 0, -1 do -- First value means for the start, second value means for the end, and the third variable is how much number you want to skip from start to end. Like from 99 to 0, you want to skip -1 value between. NumberValue.Value = i -- Set the value to the index wait() end