Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Health bar not working? [SOLVED]

Hi, I was trying to make the health bar but somehow it seems that it is not working. Here is the code. I made a GUI and inside the GUI i inserted ImageLabel . Thank you for reading/helping.

H = script.Parent
P = script.Parent.Parent.Parent.Character.Humanoid

while true do
	wait()
if P.Health <=100 then
--Code removed due to problem has been fixed.
end

Pss. Others are like if P.Health <=95,90,85, Etc... Psss. The script does not make the image invisible nor visible. It just show the last animation.

3 comments

0

whats the problem?

0

and whats the output?

0

Whenever i click Play SOLo in studio it says Error loading core script StarterScript

2 answers

✓ Accepted answer

Script looks fine. I think there is a problem in Roblox Studio. Try different scripts on other games you made like simple FPS script, If it does not work that means There is a problem in Studio. Contact info@roblox.com. They might help you. :) Hope this helps your problem :)

2 comments

0

Your right. I tested some games with a working script and it shows this error everywhere! Even with different scripts! Thanks for me helping bro :D

0

Glad I could help you :)

Did you put in the correct id? For example, you forgot to subtract the id by 1.

This discussion is preserved as it was. New answers, comments, and votes are closed.