Hello! Is there any way to make guis fit different screens without scripting? Like a percentage scale or something. Also the position, please. Thank you so much!
Any other ways to make guis fit to different devices beside from scripting?
1 answer
Most GUIs have a size property that uses UDim2, which is composed of 4 values. xScale, xOfffset, yScale, and yOffset.
Offset is based on raw pixels, which means a screen that has different pixel counts on either dimension will look different compared to the screen you made the GUI on.
The percentage number you're looking for is scale. Scale (short for scalar) is based on the percentage of the screen that you want the GUI to take up. (0.5, 0, 0.5, 0) only uses scale and will take up half of the x dimension and half of the y dimension for the Roblox window.
Position also uses the same UDim2 values as size, so a GUI element placed at (0.5, 0, 0.5, 0) will render with its center (if the anchor point is at [0.5, 0.5]) at the exact center of the screen. It should be noted that the position its rendered at is also based on the anchor point of the object.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
https://idownvotedbecau.se/noresearch/
If you spent about a minute or two and searched up base gui's and then found the position and then you see that there are variables in it that is scale instead of pixels
UIAspectRatio
Wow! Thank you so much! Sometimes I forgot to search youtube because most of the time it doesn't have the things I want.