Hello developers!
I want to make a countdown for a game like hop potato but the countdown timer messes up the round time and stops the round timer, If you have an idea on how to fix this dont hestitate to write a comment here
Hello developers!
I want to make a countdown for a game like hop potato but the countdown timer messes up the round time and stops the round timer, If you have an idea on how to fix this dont hestitate to write a comment here
Does the countdown timer stop the round timer?
Yes, it messes with the timer, but when the timer is done is unfreezes the round timer.
Maybe use this for the Countdown Timer:
coroutine.wrap(function()
for i = 30, 0 , -1 do
wait(1)
end
end)
that is because you are waiting on line 234, due to this. It is halting the code execution so it never loops back around to the status.value line to set the text. In order to solve this you should set the timer outside of the roundPlayers loop. Now you will also need to move the Status.Value code into the timer loop as well so it updates. To do that it would look something like this.
for i, v in pairs(roundPlayers) do
end
for i = 30,0,-1 do
task.wait(1)
end
--now check for player that has soup and destroy head
well no, the roundPlayers code is just an empty loop now, I just didnt put it there since I didnt want to write the whole code. Also the for loop should be the 30 second timer you need. Think of the code itself. The loop would count down from 30 to 0 and set the Status.Value. Once thats finished you can simply get the player currently holding the can and remove there head.