local part = game.Workspace.TestStarter
local isDebounce = false
part.ClickDetector.MouseClick:Connect(function()
if isDebounce == false then
isDebounce = true
for i = 5,1,-1 do
print("Test".." "..i)
task.wait(1)
end
end
end
print("Lava Started")
part.BrickColor = BrickColor.new("Really red")
task.wait(10)
print("Able to start countdown again")
part.BrickColor = BrickColor.new("Really blue")
debounce = true
end)
#Trying to make a cooldown for a countdown
24 messages · Page 1 of 1 (latest)
** You are now Level 11! **
then why the unecessary code
oh like the brickcolors?
yeah
i just added it for fun but i can remove them lol
remove n send
alr
local part = game.Workspace.TestStarter
local debounce = false
part.ClickDetector.MouseClick:Connect(function()
if not debounce then
debounce = true
for i = 5,1,-1 do
print("Test".." "..i)
task.wait(1)
end
end
print("Lava Started")
task.wait(10)
print("Able to start countdown again")
debounce = false
end)
i also changed debounce to false at the end
local part = game.Workspace.TestStarter
local debounce = false
part.ClickDetector.MouseClick:Connect(function()
if debounce == false then
wait(5)
debounce = true
for i = 5,1,-1 do
print("Lava Started")
task.wait(10)
print("Able to start countdown again")
debounce = false
end
end
end)
and
?
it does a 5 second timer at the start when u click on the button
yeah
isint that what u wanted
i removed print (i)
add it back