|
| 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 |
|
|
| 18 Nov 2014 03:21 PM |
b1
//:Current Councilor of Remnants of ROBLOX. Join today, and live to see the future:\\ |
|
|
| Report Abuse |
|
|
| 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 |
|