Fix Health Bar Problem NPC

I need Help fixing the red square that appears after killing NPC

![999Capture|690x142]
code:

NPC:
gui2Capture

1 Like

Try messing around with the GUI’s and changing their visibility after the NPC dies. If set the Meter’s visibility to false and the red bar goes away then that’s the problem and you can work from there. Also, a video or screenshot of how the frames are set up would be nice.

3 Likes

probably because it goes negative?

try setting the “ClipDescendants” property to false in the bar GUI

1 Like

You should add a math.clamp around the healthChange calculation.

1 Like

wow math.clap I got to do more research that I am new to scripting and I am on the 18 videos of The Beginner Roblox Scripting Tutorial by TheDevKing. But thank you for replying really appreciate it

2 Likes

Thank you so much for taking time out of your day to replying I really appreciate it

2 Likes

Thank you for replying I set the health bar to ClipDescendants and it fix the problem

1 Like