Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you get a GUI to work on all screen sizes?

Asked by 3 years ago
Edited 3 years ago

I have tried plugins and following peoples tutorials. Personal GUI Rescaler, AutoScale Lite, & Offset to Scale. However none of them are working correctly. My GUI is a ScreenGUI and it has a Scrolling frame with TextButtons in it in a grid format.It seems no matter if I have GridLayoutGUI or not in it the size of the boxes change and the position is never in the place I need it on the different simulated screens. I am kinda wondering also if anyone else is having the same exact issue. Currently it makes using the GUI unusable in a game.

1 answer

Log in to vote
0
Answered by 3 years ago

When you are moving your gui elements around or resizing them, click the dropdown for position/size then click the dropdowns for X and Y. You should see Scale and Offset. Another important part is AnchorPoint It will be listed under Data where Position and Size are. Anchor point takes two values ranging from 0 or 1 (example: 0.4, 0.1) What AnchorPoint means is where what part of the screen the gui element will reference when you move it. 0, 0 is the top left corner, 1, 1 is the bottom right corner, 0.5, 0.5 is the center of the screen. If you wanted something to stay in the middle on the left side of the screen you would set AnchorPoint to 0, 0.5. If you want GUI elements to scale with the window then you would set the size of the element with the Scale value located in Size. 0,0 means it stays the same size in pixels whatever the screensize is, 1, 0 would make the gui scale with the window horizontally, 0, 1 would do the same but vertically, 1, 1 would make the gui the same size as the screen. So let's say you wanted a GUI element to scale with the whole screen, you would set Scale to 1,1 and use Offset to make the GUI the size you want it. This will make that gui element the same size relative to the size of the screen. Hope this helps.

Ad

Answer this question