generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Help me with my custom Health GUI error please.

Previous Thread :: Next Thread 
SoarinApple is not online. SoarinApple
Joined: 03 Sep 2014
Total Posts: 13217
18 Nov 2014 03:03 PM
I have a Health GUI, and it doesn't work when I take damage.

This is the Health GUI: http://gyazo.com/88a8c3405dff0b4e6eb1e4d971e4e585

______________________

Here is the regular script code:

repeat wait() until script.Parent == "PlayerGui"
script.Parent.HP.Disabled = false

______________________

Here is the code from the script named "HP":

local char = workspace:FindFirstChild(script.Parent.Parent.Parent.Name)
hum = char.Humanoid
hum.Changed:connect(function()
script.Parent.Frame.Health.Size = UDim2.new(hum.Health/hum.MaxHealth, 0, 1, 0)
script.Parent.Frame.Text.TextLabel.Text = ""..hum.Humanoid.."/"..hum.MaxHealth..""
if hum.Health <= hum.MaxHealth*0.15 then
script.Parent.Frame.Health.Frame.BackgroundColor3 = Color3.new(150, 0, 0)
else
script.Parent.Frame.Health.Frame.BackgroundColor3 = Color3.new(0, 170, 0)
end
end)


Please help... D:

//:Current Councilor of Remnants of ROBLOX. Join today, and live to see the future:\\
Report Abuse
SoarinApple is not online. SoarinApple
Joined: 03 Sep 2014
Total Posts: 13217
18 Nov 2014 03:21 PM
b1

//:Current Councilor of Remnants of ROBLOX. Join today, and live to see the future:\\
Report Abuse
Fearlessblocky202 is not online. Fearlessblocky202
Joined: 16 Jun 2010
Total Posts: 391
18 Nov 2014 03:55 PM
I didn't look at it very closely so there may be more errors, but this is one for the color3:

It is supposed to be
Color3.new(150/255, 0/255, 0/255)
and
Color3.new(0/255, 170/255, 0/255)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image