is there a way I can adjust the GUI scaling for mobile while keeping it grounded to the base of the screen?
many thanks
is there a way I can adjust the GUI scaling for mobile while keeping it grounded to the base of the screen?
many thanks
If you followed these 2 you should be fine.
1- Use Scale
instead of Offset
in the Size
property.
2- Add UIAspectRatioConstraint
the GUI itself is animated using offset, is it possible to do it without it?
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.
if I use scale wont it show the user the GUI scaling up as it comes in, rather then transitioning it in?
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
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):
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.