GUI Scaling Help

is there a way I can adjust the GUI scaling for mobile while keeping it grounded to the base of the screen?

many thanks

1 Like

If you followed these 2 you should be fine.
1- Use Scale instead of Offset in the Size property.
2- Add UIAspectRatioConstraint

1 Like

the GUI itself is animated using offset, is it possible to do it without it?

1 Like

I’m guessing by animated you mean TweenSize or TweenPosition? If any of the 2 it’s probably best if you do change it to scale.

1 Like

if I use scale wont it show the user the GUI scaling up as it comes in, rather then transitioning it in?

1 Like

Are you using tweenposition, tweensize or a custom tween? The first two have scale and offset as sub properties, scale being better than offset because its more compatible with other screen resolutions (which is what you need help with if I’ve read correctly). Don’t confuse the Scale sub property with the Size property, btw.

script.Parent.MouseButton1Down:Connect(function()
    script.Parent.Parent.Parent.Parent.Parent.ScreenGui.Frame:TweenPosition(UDim2.new(0, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1)
    wait(1)
    script.Parent.Parent.Parent.Parent.Parent.ScreenGui.Frame.Visible = false
end)

this is an example of the GUI close script

1 Like

You’re only tweening the Y scale, so it’s fine.
You can see that you’re only doing scale in the properties like this (this is an example of what position and size properties should look like on UI):
image
If the offset isn’t 0, make it 0 and then edit the scale property to make the size be the same as before.

Now, try adding UIAspectRatioConstraint (if the size comes out different after you add it change the aspectratio) and then try play testing on your mobile again.

1 Like

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