This event fires when the
Humanoid/Health changes. However, it will not fire if the health is increasing from a value equal to or greater than the
Humanoid/Health reaches zero, the
Humanoid will die and the
Humanoid/Died event will fire. This event will fire with a value of zero.
The new value of
This code sample allows you to create a simple color-changing health bar using two nested Frames. Paste this into a LocalScript on the inner frame.
The following example determines the change in health, printing it to the output. It will only work in a LocalScript.