#Making a Health Circle thing like in The Forest
1 messages · Page 1 of 1 (latest)
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local UI = script.Parent
local MainFrame = UI.MainUIFrame
local Background = MainFrame.Background
local Center = Background.Center
local CenterImage = Center.PlayerImage
local LifeCircleFrame = Background.Life
local StaminaCircleFrame = Background.Stamina
local LifeCircle = LifeCircleFrame.Circle
local StaminaCircle = StaminaCircleFrame.Circle
local Percentage = Instance.new("NumberValue")
Percentage:GetPropertyChangedSignal("Value"):Connect(function()
local Rotation = math.floor(math.clamp(Percentage.Value * 3.6, 0, 360))
LifeCircle.UIGradient.Rotation = math.clamp(Rotation, 0, 180)
end)
Humanoid.HealthChanged:Connect(function(Damage)
TweenService:Create(Percentage, TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Value = Damage}):Play()
end)
here it is the script
the percentage is being set to the damage value
not an actual percentage
im assuming percentage here would mean the percentage of the current health and max health
what is with the reaction 💀
uhm interesting
but like
how could i make this
currentHealth/maxHealth