team1 = game.Teams("Humans") team2 = game.Teams("Aliens") function OnDeath() Player.TeamColor = team2 end end humanoid.Died:connect(OnDeath)
Im not sure if my script is correct,but if it isn't please help me. Im trying to make a script so that when a player dies he/her will go to team2
team1 = game.Teams["Humans"] team2 = game.Teams["Aliens"] Game.Players.PlayerAdded:connect(function(Player) --When a Player joins Player.CharacterAdded:connect(function(Character) --When they respawn Character.Humanoid.Died:connect(function() --When they die Player.TeamColor = team2.TeamColor --Put them on the 'Aliens' team end) end) end) --Place in a Script in ServerScriptService