local function SetProgress(health, maxHealth)
local heal = math.clamp((health / maxHealth),0,1)
if health == 0 then
heal = 0
else
heal = math.clamp((health / maxHealth),0,1)
end
print(heal)
local T1 = game:GetService("TweenService"):Create(Base.BgFrame,TweenInfo.new(0.2,Enum.EasingStyle.Sine, Enum.EasingDirection.Out),{Size = UDim2.fromScale(heal,1)})
local T2 = game:GetService("TweenService"):Create(Base.BgFrame.Health,TweenInfo.new(0.2,Enum.EasingStyle.Sine, Enum.EasingDirection.Out),{Size = UDim2.fromScale(heal,1)})
T1:Play()
T2:Play()
end
I also noticed that if i added 0.2 to the heal it will be sized correctly but after 70%
it stays looking full if the health is 100% or 90% or 80%.