Problem with resizing a gui using a script

Hello everyone,

I’m trying to resize the gui using a script but the problem is that the size gets changed from down instead of up.

Here what I want:
adadas

here is what happens instead:
gsgfsafa

script:

local GreenHealth = script.Parent.GreenHealth

task.wait(3)
while true do
	task.wait(1)
	print(game.Players.LocalPlayer.Character.Humanoid.Health)
	GreenHealth.Size = UDim2.fromScale(1,game.Players.LocalPlayer.Character.Humanoid.Health / game.Players.LocalPlayer.Character.Humanoid.MaxHealth)
end

-- I know the script isn't good but I just use it for testing

thanks for your time

Try setting the AnchorPoint Y to 1, that would put it to the bottom.

1 Like