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?
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.