I'm currently making an FPS/Survival game. I made a Script just for the NPC. To follow the player, to attack when close. I want it so that when the NPC dies, its limbs, torso, and head will be removed after a few seconds. Here's the script.
function onDeath()
local mobmodel = script.Parent
if mobmodel.Zombie.Health > 1 then
wait(3)
mobmodel:remove()
else
end
mobmodel.Zombie.Health.Changed.connect(onDeath)
Am I missing something? Do I need to change something?

1 comment
+1, but you should use :Connect instead of :connect as the lowercase one is deprecated.