So I have a round based game and if all the players in a team die then it will break the for loop and continue. That's what I want it to do. What it's actually doing is pausing the timer for about 5 seconds and continue. Please help..!
-- the parts that really matter for countdown = 300,0, -1 do if script.endRound.Value == true then script.CountDown.Value = 0 break end if game.Workspace.Radio.Activated.Value == true then wait(20) script.CountDown.Value = 0 for _, v in pairs(Players:GetChildren()) do if v.TeamColor == BrickColor.new("Dark stone grey") then v.leaderstats.Cash.Value = v.leaderstats.Cash.Value + 50 end end script.CountDown.Value = 0 break end for _, v in pairs(Players:GetChildren()) do if v.TeamColor ~= BrickColor.new("Dark stone grey") then for _, v in pairs(Players:GetChildren()) do v:LoadCharacter() script.endRound.Value = true wait(5) script.endRound.Value = false end end end script.CountDown.Value = countdown wait(1) end