Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Health bar not working? [SOLVED]

Asked by 9 years ago

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.

0
whats the problem? NinjoOnline 1146 — 9y
0
and whats the output? NinjoOnline 1146 — 9y
0
Whenever i click Play SOLo in studio it says Error loading core script StarterScript Chillu4 0 — 9y

2 answers

Log in to vote
0
Answered by 9 years ago

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 [email protected]. They might help you. :) Hope this helps your problem :)

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 Chillu4 0 — 9y
0
Glad I could help you :) PlayingOBC 70 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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

Answer this question