team1 = game.Teams("Really red") team2 = game.Teams("Bright blue") function OnDeath() Player.TeamColor = team2 end end humanoid.Died:connect(OnDeath)
What it is supposed to do is when a player dies they go to red team,And stay there. This is really new to me so I want to see if this is correct.
team1 = BrickColor.new("Really red") --I have no idea what game.Teams with a BrickColor is, but I fixed it to BrickColor so that the team will change properly. team2 = BrickColor.new("Bright blue") --I have no idea what game.Teams with a BrickColor is, but I fixed it to BrickColor so that the team will change properly. game.Players.PlayerAdded:connect(function(p) -- You want to connect to the player, if they are in the game. p.CharacterAdded:connect(function(c) --A Character now exists. Now you can use the died event. c:WaitForChild("Humanoid").Died:connect(function() --We need to wait for Humanoid to exist and to die. p.TeamColor = team2 --Now the player changes to Team2. end) end) end)