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

For some reason my overhead health bar is not working, can anyone help?

Asked by 4 years ago

i put a script with a billboard within, a frame within the billboard, and a frame within a frame, all in starter character scripts

this is the script

local char = script.Parent
local healthGui = script.Health2
local humanoid = char.Humanoid
healthGui.Parent = char.Head

humanoid:GetPropertyChangedSignal("Health"):Connect(function()
    local healthChange = humanoid.Health/humanoid.MaxHealth
    local healthColor = Color3.fromRGB(255,0,0):Lerp(Color3,fromRGB(60,255,0), healthChange)
    healthGui.Health.Meter.TweenSize(UDim2.new(healthChange,0,1,0), "In", "Linear",1)
    healthGui.Health.Meter.BackgroundColor3 = healthColor
end)

0
are you sure that the billboardgui is 1. in a place that is initialized? 2. is adornee'd to the player model's head? Fifkee 2017 — 4y
0
Any error messages? Jexpler 63 — 4y
0
unfortnately no error message RamenRobloxian 2 — 4y
0
fifkee yes RamenRobloxian 2 — 4y

Answer this question