I have a game that has a lot of gui's, but they become off-centered and no longer have edges that match up the way I want them to anymore when the resolution changes. Is there a way to make gui's become smaller in all directions as the resolution becomes smaller to prevent this?
How to make gui's compress and stretch ALL THE TIME when resolution changes?
1 answer
When creating GUI, you will notice the default size is usually something like {0,100},{0,100} for frames and {0, 200},{0, 50} for TextLabel and TextBox. The first and third digits are called Scale. The second and fourth digits are called Offset. You should always use Scale to avoid GUIs from going off-screen. Scale will make sure the GUI fit on the screen.
Example 1: If you're trying to set a GUI to cover the full screen, the
UDim2value can be set to {1,0},{1,0}
Example 2: If you're trying to set a GUI to the center of the screen, we will use
AnchorPoint. Set the AnchorPoint value to 0.5,0.5. This will move the GUI to the center of the screen. Now you can use the Scale values to make the GUI however large you want.
1 comment
Thanks. I got a plugin that converted all my offset values to scale values.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
You mean UDim2 Scale properties? UDim2.new(xScale,xOffset,yScale,yOffset). The scale properties will be affected by the size of the screen resolution(if parented to a ScreenGui) or the size of the guiobject it is parented to (frames,textbuttons). If you set a button position to UDim2.new(0.5,0,0.5,0) for example, the button will be placed at .5 the size of the screen, which is the center.
Does that also affect the size of the Gui?
Yes
Great question!