I tried using this script to make the orange team die and spawn at their spawn point just as a start to what I'm doing. All goes fine and dandy up until my player dies they respawn and the game starting timer resets instead of using the round timer.
local s = script.Stat -- this is intermission t = 0 while true do t = 10 repeat t = t-1 s.Value = "Game Starting In "..t.." Seconds" wait(1) until t == 0 s.Value = "Game Starting" wait(2) for i, v in pairs(game.Teams.Orange:GetPlayers()) do v.Character.Head:Destroy() end end
wait(1) -- this is supposed to be in round s = 0 while true do s = 10 repeat s = s-1 s.Value = s.."Seconds Remain" wait(1) until s == 0 s.Value = "Defenders Win" end
You would use break
to exit from a loop. Simply insert break
in the loop where you want to stop the loop.
I'll make an assumption and edit your script, placing break
where I see fit.
local s = script.Stat -- this is intermission t = 0 while true do t = 10 repeat t = t-1 s.Value = "Game Starting In "..t.." Seconds" wait(1) until t == 0 s.Value = "Game Starting" wait(2) for i, v in pairs(game.Teams.Orange:GetPlayers()) do v.Character.Head:Destroy() end break; -- stop loop here and continue with the script end wait(1) -- this is supposed to be in round s = 0 while true do s = 10 repeat s = s-1 s.Value = s.."Seconds Remain" wait(1) until s == 0 s.Value = "Defenders Win" break; -- stop loop here end