Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you team change after death?

Asked by 10 years ago

I have tryed this

Ondeath
Player.Team.Team.new = ("Really red")

Im not a really good when It comes to to new things But can somebody help me with this.

What I am trying to do is when a player dies,They instantly turn to the red team. I just have no idea where to start?

1 answer

Log in to vote
-3
Answered by
Vividex 162
10 years ago

basically just edit TeamName1 and TeamName2 nothing else:-)))

wait(1)
player = script.Parent.Parent.Parent
char = player.Character
humanoid = char:findFirstChild("Humanoid")
team1 = game.Teams["TeamName1"] --put team name 1 here
team2 = game.Teams["TeamName2"] --put team name 2 here

function OnDeath()

if player.TeamColor == team1.TeamColor then --dont edit
player.TeamColor = team2.TeamColor --dont edit
elseif player.TeamColor == team2.TeamColor then --dont edit

end
end

humanoid.Died:connect(OnDeath) 

hiiiiii

Ad

Answer this question