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!
You forgot to end the other functions,
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 end) end)