Humanoid.Died Function isn't working properly?

I assume this is because of the fact that the player loads before the StarterGui is loaded/initialized. Making the script just not work. And the script reloads every time the player loads due to the fact of respawn. So the player spawns. Then the script loads. And the event doesn’t fire, which doesn’t initialize the .Died event, making it so that the script thinks there is no player, because the player loads before the script.

TLDR: Player loads before script loads.

Yep, you’re right. Tried using this code and it worked:

Char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
Char:WaitForChild("Humanoid").Died:Connect(function()
	print("Played Died.")
end)
1 Like

Yup, because you’re not waiting for a character to be added, because I assume it already is added. (So this will work perfectly fine.)

1 Like