so im making an intermission script and when there’s not enough players the countdown stops is what im trying to do but the else
function triggers only once and when the enoughPlayers
changes back to false again it will not print it back but instead do the function it was doing when the bool was set to true
local function countdownTimer()
while wait() do
if enoughPlayers.Value == true then
for i = intermissionLength, 1, -1 do
ingame.Value = false
wait(1)
timer.Value = i
end
for i = gameLength, 1, -1 do
ingame.Value = true
wait(1)
timer.Value = i
end
else
print("not enough players")
--some stuff here
end
end
end
spawn(countdownTimer)