Gui size is too big



local player = game.Players.LocalPlayer
local amount = player:WaitForChild("AmountWater")
local max = player:WaitForChild("MaxWater").Value
print(amount)
amount.Changed:Connect(function()
	local Formula = math.clamp(amount.Value/100,0,1)
	script.Parent.Water:TweenSize(UDim2.new(Formula, 0, 0,50), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.15, true)
end)

By the way, the photos are explaining what I want to say. I don’t know why size is too huge in the game. How should I solve this problem?

Maybe the size is set to offset instead of scale, and screen size changes cause it to become bigger or smaller. Try changing it to scale instead

1 Like

Use scale instead of offset. Offset is based off pixels, so when the screen shrinks, the gui stays the same. On the other hand, scale keeps a relative size so when the screen shrinks it will stay the same.

1 Like

how could I use scaling instead of offset?

1 Like

There’s a free plugin called AutoScale that automatically converts offset to scale.

1 Like

Thank you. I solved this problem.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.