Hi,
How would I do a countdown going up (1,2,3), after going down (3,2,1 ) looked everywhere but I cant seem to find a solution.
Hi,
How would I do a countdown going up (1,2,3), after going down (3,2,1 ) looked everywhere but I cant seem to find a solution.
Can you be more specific about what you want to do exactly?
Alright so,
I want to do a countdown like they do with rocket launches, so the countdown goes 5,4,3,2,1 then when the rocket lifts off it’ll go 1,2,3,4,5.
I already have the countdown going down, but no idea how to make it go up when its 00:00
You would need to use debounce
for this type of situation
Here is a article that covers more about it: Debounce
local UIButton = script.Parent
local Debounce = false
UIButton.MouseButton1Down:Connect(function()
if not Debounce then
Debounce = true
print("Now wait to click again!")
wait(5)
Debounce = false
end
end)
I am having trouble reading this. How does a timer relate to a denounce?
Regarding the topic, you would have to do something like this:
local num = 10
while true do
wait(1)
num = num - 1
if num == 0 then break
end
while true do
wait(1)
num = num + 1
end
You can do this,
local seconds = 3
-- going from 3 to 1
for i = 3, 1, -1 do
seconds = i
wait(1)
end
-- going from 1 to 3
for i = 1, 3, 1 do
seconds = i
wait(1)
end
Hey there! There was a similar topic made by another user to which I answered with some code from a while ago,
Hope this helps!