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

Why won't my custom health bar work?

Asked by 8 years ago

local Gui = script.Parent local Fill = Gui.Health.Frame local char = script.Parent.Parent.Parent.Character hum = char.Humanoid local Player = game.Players.LocalPlayer repeat wait() until Player.Character local Character = Player.Character local Health = hum.Health local HealthMax = hum.MaxHealth function updateBarAndText() Fill:TweenSize(UDim2.new((Health/HealthMax),0,1,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .1, true) end

I was experimenting with tweening to make a health bar but it does not work. I don't see any errors

0
Have you tried printing somewhere in the updateBarAndText function, to see if it's firing? There might be a problem later in the script. Pyrondon 2089 — 8y
0
k Relampago1204 73 — 8y

Answer this question