How does one resurrect an NPC?

In a game that I’m working on, there is a boss fight. The weapons in the game use a custom system which allows for headshots. If a player (or NPC) is shot in the head, their head falls off.

I can do the animation for the boss walking over to it’s head, picking it up, and putting it back on it’s head. The problem is how to I resurrect the NPC without respawning if Humanoid:Died has fired?

I can reattach the head by recreating the MotorD6, but I can’t give the NPC health if it’s 0.

Well, there’s some steps you can do.

  1. The humanoid is now trashed. Delete it and we’ll replace it later.
  2. Reassemble joints
  3. Replace the humanoid with one that has the correct settings and health set to 1 or something, with PlatformStand enabled.
  4. Increase health.
  5. Disable PlatformStand

This system should work if you know how to code it.

You could set and freeze its health at 1 (instead of dealing enough to damage to kill it), disable the humanoid’s ‘RequiresNeck’ property and break the humanoid’s joints. This will prevent the humanoid from entering a ‘died’ state.

1 Like

Hmm… I like this idea. A head shot where the head falls off is not fatal. I will have to think about how to implement this within my current weapons system.