i’ve been working on an arcade-style game; and i need to add a health bar…
i tried so many ways… i’m not very good at math not this complex math at least;
a few examples:
local TweenService = game:GetService("TweenService")
local UI = path.to.UI --where your UI is
local function SetEvent(char)
local Hum = char:FindFirstChild("Humanoid")
if Hum then
Hum.HealthChanged:Connect(function()
local Track = TweenService:Create(UI.healthbar2, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.fromScale(Hum.Health / Hum.MaxHealth, 1)})
Track:Play()
end)
end
end