for i,player in pairs(game.Players:GetChildren()) do player.TeamColor = BrickColor.new("White") local torso=player.Character:FindFirstChild("Torso") torso.CFrame=NS+Vector3.new(0,i*5,0) if player.Backpack.pie ~= nil then player.Backpack.pie:Destroy() end end
This is basically supposed to set all of the player's teams to White, but for some reason it only sets 1 or 2 players to that team rather than everyone. Some help?
for i,player in pairs(game.Players:GetChildren()) do player.TeamColor = BrickColor.new("White") local torso=player.Character:WaitForChild("Torso") torso.CFrame=NS+Vector3.new(0,i*5,0) if player.Backpack:FindFirstChild("pie") ~= nil then player.Backpack.pie:Destroy() end end
Tell me if it works, there we lots of things in there that could've been fixed incase of an error so I did it for you.