player = game.Players.LocalPlayer
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
if player.TeamColor.BrickColor.Name == ("Dark blue") then
player.TeamColor.BrickColor.Name = ("Really red")
else
player.TeamColor.BrickColor.Name = ("Dark blue")
end
That is the code.
This is the error.
Workspace.Team change when die.:13: Expected 'end' (to close 'function' at line 3), got <eof>
Im not sure how to deal with errors. Please help , thanks!

1 comment
is the end of file, meaning that your script terminated too early. If it says the phrase "got ," then it was probably expecting something like an "end" or some other identifier. Remember, if you should indent a group of lines, there should probably be an end accompanying it.