When a humanoid’s health is set to 0 and at exactly the same time the health is set to a positive nonzero, the humanoid is not put in the dead HumanoidState. This would imply that, with precise timing, deaths of humanoids through 0 health can be negated when the health is set to positive nonzero at that exact moment.
This may depend on the game played, but the default health regeneration script (1% health every second) could result in this as well.
This can be done through different scripts. One script that rapidly heals the humanoid over time will negate the death caused by another script that tries to set the Humanoid’s health to 0.
System information:
- CPU: Intel(R) Core™ i7-10750H CPU @ 2.60GHz
- Memory: 16,0 GB
- GPU 0: Intel(R) UHD Graphics
- GPU 1: NVIDIA GeForce RTX 2070 with Max-Q Design
Provided is a basic place with the character’s default health script modified to set the health to 0, followed immediately with the default health regeneration (+1% health). The player’s health stays at 1% health.
HealthBug.rbxl (41.6 KB)
Expected behavior
I expect the humanoid to enter the dead HumanoidState once health reaches 0 at any moment. Afterwards, the humanoid’s health can no longer be positive nonzero and the humanoid remains dead.
In this case, the humanoid should remain dead with 0 health, and the healing should not be applied, even if done at the exact same time.