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

How can I make sure my gui is locked and stays in place on other res screens?

I have been working on a game with a gui that has a button, above and under the button shows weather for the game etc. The weather and the button both move while playing on a different device/screen. Or simply resizing my window moves it. can someone help? thanks!

1 comment

0

Use scale instead of offset for size/position and use text scaled in GUI objects that have text.

1 answer

In a GUI object, there are two values in the X and Y positions: Scale and Offset. The Offset is the position or size in Pixels of the GUI object, and the Scale is the Ratio of how much of the screen the position or size takes up. The Scale is relative to screen size and it should almost always be used if you want your game to look good on all computers. The Scale of a UDim2 value can be anything, but 1 is the size of the screen, so anything above 1 will be bigger than the screen.

For more information:

ROBLOX Wiki: UDim2

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