I'm wanting to know if it's possible to make this change colors as you have less and less health. Full health = Neon Green 75 Health = Yellow green 65 Health = Yellow 50 Health = Orange 24 And below = Red
local PositionX = script.Parent.Position.X.Offset
local initX = script.Parent.Size.X.Offset
while true do
wait()
local PlayerHealth = script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health
local PlayerMaxHealth = script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.MaxHealth
local Pie = (PlayerHealth / PlayerMaxHealth)
script.Parent.Size = UDim2.new( 0, initX*Pie, 0, 20)
end

2 comments
Hmm...I'm still having problems. The GUI's children looks like this: HealthBar>NewFrame>HealthBar>Front. Front is where the GUI is stored at.
Is the script in "Front"?