basically I'm making a script that prints "played died" when the certain person dies though when the person dies, the script stops working. Here's the source:
local hum = game:GetService("Players").LocalPlayer.Character.Humanoid
hum.HealthChanged:connect(function(health)
if (health == 0) then
print("player died!")
end
end)
The script only works once, how do I make it work again when the character respawns?