Log in to vote
1

How do you position a GUI to fit all screens? [closed]

Asked by
NecoBoss 194
7 years ago

I want the GUI to be relatively the same to the screen size. Can anyone help?

Locked by Shawnyg, adark, Thewsomeguy, TheGuyWithAShortName, and AmericanStripes

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 7 years ago

You would change the first number in the bracket's of the size to 1, like this: {1,0},{1,0}.

0
This doesn't work... NecoBoss 194 — 7y
0
Nevermind I got it working xD NecoBoss 194 — 7y
Ad
Log in to vote
3
Answered by 7 years ago

UDim2 has two ways of sizing, by offset and by scale. Scale will be the same fraction of the screen for everyone, while offset change depending on the window size of Roblox, the screen size, and resolution.

Scale is from 0-1, while offset can be any number. The best way to do GUIs is to have scale as a fraction, and ONLY use offset for spacing (when you always want exactly 3 pixels between your GUI elements)

The constructor for this is UDim2.new(XScale,XOffset,YScale,YOffset) UDim2.new(1/4,0,1/2,0) will be 1/4th of the screen's width and 1/2 of the screen's height, for example.