Edit: Nevermind I just added a CharacterAdded function and it worked
I have a script that reduces a number value once a user dies. It worked fine until I tried to add a line of code that would also change their team once they died. Now the script doesn't seem to be working at all. Here's what it looks like:
game.Players.PlayerAdded:Connect(function(p)
wait(1)
p.Character.Humanoid.Died:Connect(function()
if p.Team ~= game.Teams.Choosing then
p.Team = game.Teams.Choosing
game.ServerScriptService.CoreScripts.CoreValues.PlayersLeft.Value = game.ServerScriptService.CoreScripts.CoreValues.PlayersLeft.Value - 1
end
end)
end)

2 comments
The player's Team must be Choosing if it isn't working.
Should also be noted that Humanoid:Died() isnt a method of the humanoid. Although in your code you did use the event, so Im not sure where you were going with there haha.