I have a script that switches a player from the "Human" team to the "Zombie" team upon death. Now, this use to work a while back, but now I think it's a bit outdated. I can't seem to spot anything funny about it.
player = script.Parent.Parent.Parent Humanoid = player.Charcter:FindFirstChild("Humanoid") Survivor = game.Teams["Survivors"] Zombie = game.Teams["Zombies"] function onDeath() if player.TeamColor == Survivor.TeamColor then player.TeamColor = Zombie.TeamColor print("A player has turned") elseif player.TeamColor == Zombie.TeamColor then print("Already a zombie") end end Humanoid.Died:connect(onDeath)
The TeamColor value is a BrickColor3 value. You need to do BrickColor3.new(Survivor/Zombie.TeamColor)
.