My problem
I'm trying to make a NPC destroy itself after being killed by a player, I put a Humanoid into the dummy, after that I put a server scriptinto that dummy too, and this is a code inside:
local dummy = script.Parent
while true do
if dummy.Humanoid.Health == 0 then
wait(5) -- destroy after 5 secs
dummy:Destroy()
end
wait(5) -- script cooldown
end
The output give me no error
I played the game, kill the dummy, and he still there after 5 secs, i don't know why.
Hope you guys help me.

2 comments
why not use humanoid's died event?.
If you disabled the HumanoidStateType.Dead then Humanoid.Died would not run