Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you team change after death?

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.