So this script is meant to move bricks when the "Playing" Team has 0 players. Then wait until the playing team has no more players again, and do the same thing. Its also supposed to rapidly print the number of players on each team.

while true do
	local teams = game:GetService("Teams"):GetTeams()
for _, team in pairs(teams) do
		    local players = team:GetPlayers()
			print(team.Name .. " has " .. #players .. " players") 
		if team.Name == "Playing" and #players == 0 then
			wait(10)
			print("Round End")
			game.Workspace.Round.Value = 0
			game.Workspace.Tp.Position = Vector3.new(5.26, 263, -12.114)
			wait(.5)
			game.Workspace.Tp.Position = Vector3.new(5.26, 229, -12.114)
			wait(60)
			game.Workspace.Round.Value = 1
			game.Workspace.Tpb.Position = Vector3.new(-3.926, -198.262, -5.437)
			wait(.5)
			game.Workspace.Tpb.Position = Vector3.new(-3.926, -356.262, -5.437)
		end
		wait(.1)
end 
end

But for some reason, Instead of starting at "while true do" the script starts at "wait(10)" And only prints the number of players on each team after doing the if loop, then it does the if loop again and prints the number of players. I need it to print the number of players, and if there is zero on the playing team, do the loop.

1 comment

0

Did it print anything at line 5?