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

How can I get the player to switch teams on death?

I already tried this code:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:WaitForChild("Humanoid").Died:Connect(function()
			if player.TeamColor == ("New Yeller") then
				player.TeamColor = BrickColor.new("Brown")
			end
end
end

but it isn't working for some reason.

1 comment

0

(line 4) because the teamcolor property isnt a string

1 answer

There Is An Error On Line 4. It Should Be:

if player.TeamColor == BrickColor.new("New Yeller") then

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