My custom health bar is working fine other then the fact that it keeps going down instead of regenerating back up.
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local player = game.Players.LocalPlayer.Character
repeat wait() until player
local humanoid = player:WaitForChild("Humanoid")
local TheMathPart = humanoid.Health / (humanoid.MaxHealth)
function TheHealthbar()
local TheMathPart = humanoid.Health / (humanoid.MaxHealth)
script.Parent:TweenSize(UDim2.new(0, 25,TheMathPart, -180), "Out" ,"Sine", .5)
end
humanoid.HealthChanged:connect(TheHealthbar)
Help would be appreciated.

1 comment
Could it be that your override is set to false as you have not changed it from the default value. Try adding true to the end of the arguments for TweenSize.