Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI And overall resolution. How to get GUIs to scale perfectly on all resolutions?

Hi, so my question is how could i make an static resolution for my GUI or even anything? I see that some games have the static resolution for example if you are on fullscreen, then you can see all the GUIS perfectly, and also when you are playing windowed or smaller screen then you can see GUIS perfectly too. But my game doesnt have that function, if i make my game small windowed screen, then i cant see my shop GUI for example. How to get GUIS to scale perfectly on all resolutions basically?

4 comments

0

This is off-topic. Post on-topic questions.

0

Pretty sure this is what you are looking for: https://wiki.roblox.com/index.php?title=API:Class/UISizeConstraint

0

In the position and size, change the scale value to 1: {1, 0, 1, 0} (doesn't really matter what number). Then you can resize and reposition the gui by clicking and dragging it (same way you position and resize blocks)

0

It should automatically adjust the scale (no numbers should be in the offset).

1 answer

✓ Accepted answer

Ever wondered why a 2D Gui has 4 digits({0, 0}, {0, 0}) to put in? Why not 2(X, Y)? I have the answer to that. Let me explain you why there are 4 instead of 2. So X and Y (both of them) have something called Scale and Offset. This is how a normal Size or Position setting would look like: {0,0},{0,0}. So basicly there are are 4 digits because X is compose of scale and offset, same thing with Y. Offset is in the right, scale in the left. (X){scale, offset}, (Y){scale, offset}. So let me take an example: if you set the scale of a frame to {0.5, 0}, {1, 0}, that will be the half of the screen, no matter what device. So it will be the same size for every device, so it will always be the half. But, if you use offset, it would be that amount of pixel for only that device. This might sound confusing, I apologize I am not a very good teacher. I made a GIF which may help you understand this: https://gyazo.com/adba01315990da0d6282c2adfe4839e8

I am not saying you should only use Scale, you should use both. Just play around with them and you will understand what I mean.

7 comments

0

¯_(?)_/¯

0

So i need to use scale? Or offset which one you recommend?

0

scale... duh

0

^ as I said you should use both, depends on the case, I gave you an example of size, but same thing will happen with the position. So you should combine both of them. Depends on what you want too!

0

although it will never look perfect. for example, if you have a 20 inch monitor, but then it's scaled down to a smartphone.

0

Sorry if my explaination was not that good but I haven't seen any good tutorial with a good explaination. The way I understood this all was from a GIF someone sent me a GIF which is almost identical to the one I sent you. Then I understood what was the difference and how they should be used.

0

Yes, i understand now that. But now the thing is i dont know how to use the scale.

This discussion is preserved as it was. New answers, comments, and votes are closed.