Hi scripters, I've made a small section of code that is expected to change a player's team when they die. I don't feel like using the pre-coded scripts that are available for purchase from the Library, since i want to figure this out myself. The problem is, when the Humanoid dies in my script, a few moments later the player changes team to Neutral, but instead it creates a new team called Neutral. Any advice?
local Character = script.Parent
local Humanoid = Character.Humanoid
local Player = Character.Name
local FoundPlayer = game.Players:WaitForChild(Player)
local Neutral = game.Teams.Neutral
Humanoid.Died:connect(function()
FoundPlayer.Team = Neutral
end)
Advice is appreciated!

3 comments
I forgot to mention that this script is inside of StarterCharacterScripts, inside of StarterPlayer.
Theres nothing wrong with using the scripts from the toolbox. In fact, you should be using them. Why reinvent the wheel?
Lol, good point.