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.
- The humanoid is now trashed. Delete it and we’ll replace it later.
- Reassemble joints
- Replace the humanoid with one that has the correct settings and health set to
1 or something, with
- Increase health.
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.
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.