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

How do I auto size a GUI specific to you device? [closed]

Asked by 5 years ago

I have a GUI that is for my computer. But when I boot it up on a larger screen it is a messed up. Is there a way to auto size a GUI or load a specific GUI according to your device? So that I am able to have a large GUI for computer and a smaller one for phone. Any way to do this?

0
Use Scale when positioning and/or sizing, don't use offset Rare_tendo 3000 — 5y
0
yes, there is a detecting service for that greatneil80 2647 — 5y
0
I usually try out the different SizeConstraint properties and usually use RelativeYY for things that you want to always stay the same size but I'm not one to really base off of but if it helps yay... VeryDarkDev 47 — 5y
0
( X, Y , X , Y ) -- X is the scale, Y is sizing by pixel. For most purposes scale is better. Scale goes from 0 to 1, 1 being the entire screen and 0 being nothing. This works the same way for positioning as well as sizing. DinozCreates 1070 — 5y

Closed as off-topic by User#19524

This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
zblox164 531 Moderation Voter
5 years ago
Edited 5 years ago

Solution

Don't use offset instead use scale. Here is a plugin that does the work for you.
Offset to scale plugin

All you have to do is create a UI element and click on it then press the plugin button at the top of the screen (you need to be in the plugins tab). It will be converted to scale which resizes to all screens.

Alternate solution

Scale uses values between 0, and 1 (0 being 0% of the screen and 1 being 100% of the screen) so if you don't want to use the plugin this example would size and element half the screen size:

X: 0.5 Y: 0.5

Hope this helps!

Ad