problem is that the gui becomes smaller and ihnc why
Code:
local player = game.Players.LocalPlayer
repeat wait() until player.Character or player.CharacterAdded:Wait()
local char = player.Character
local FillGui = script.Parent
local Humanoid:Humanoid = char:WaitForChild("Humanoid")
Humanoid.HealthChanged:Connect(function(health)
health = Humanoid.Health -- just a check
local NewSize = health/Humanoid.MaxHealth -- works with any max health btw
print(NewSize)
FillGui:TweenSize(UDim2.new(NewSize, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.1, false)
end)