So I want to make it so that once someone on ANY team (There are 2 in the game, and 1 neutral, which is the lobby) dies, they will be changed to the Neutral team, so that they will spawn in the lobby. I think it would be something like: OnPlayerDeath.Team = Neutral. I know that obviously isn't the code, which Is why I'm asking e.e.
COMMUNITY QUESTION
How do I make a script that changes a person's team when they die?
1 answer
Plr=game.Players.LocalPlayer
P=Plr.Name
while true do
wait()
if game.Workspace:FindFirstChild(P)~=nil and game.Workspace[P].Humanoid.Health==0 then
Plr.TeamColor=(team color)
end
end
Probably not an efficient way to do this, but it should work.
This discussion is preserved as it was. New answers, comments, and votes are closed.
