game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local player = game.Players.LocalPlayer
player.Character:WaitForChild("Humanoid")


function CustomHealth()
	script.Parent:TweenSize(UDim2.new(player.Character.Humanoid.Health / player.Character.Humanoid.MaxHealth,-215, 0, 10), "Out", "Sine", 3)
end

player.Character.Humanoid.HealthChanged:connect(CustomHealth)

I tested it and when I take damage it would go down but instead of going back up, it would keep going like it is taking damage but really it's healing.

Help would be very appreciated.