Round system breaks frequently

Oh i think! you should add wait(2) after while true do.

i added a wait(2) and it made it a bit worse, what if i try wait(1) it did fix it for the first round

yes, try adding wait(1) if it wont work then try adding only wait()

i tried both of those and it did not solve it

i changed it to while wait() do and it works every time after the first

hmm… Maybe you should remake the script?

and make sure to use modules this time! because it will help you a ton!

this was an issue both before and after i remade it

alright i fixed this issue for good. i just wasnt giving it enough time to set all of the teams. i just moved back the code for adding the teams and its working flawlessly

local Players = game.Players:GetPlayers()

		for _, Player in ipairs(game.Players:GetPlayers())do
			if Player.Character and Player.Character:WaitForChild('Humanoid') then
				RandomSpawn = Spawns[math.random(1, #Spawns)]
				Player.Character.HumanoidRootPart.CFrame = RandomSpawn.CFrame
				Player.TeamColor = BrickColor.new("Persimmon")
				Player.Character.Humanoid.MaxHealth = 100
				Player.Character.Humanoid.Health = 100
				Player.Character.Humanoid.WalkSpeed = 16
				Survivors[Player] = true
			end
		end
1 Like