Help with gui ( scaling ig )

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)

I reproduced the issue with a basic TextLabel, no issue with it sizing down, check how your UIElements format or change your Health GUI.

Is there a UIAspectRatioConstraint in the health bar? If there is then remove it, it makes the gui keep a constant ratio

Im not sure, their not textlabels tho

oh ok thanks so much bro lemem try that

i still have the same issue :confused: