I have a main menu User Interface that looks good in Studio, stays looking good in Studio Test mode but as soon as the screen size changes, whether that be me shortening the Studio Test screen or going into a real server and full screening, everything just messes up its position. I have everything positioned in Scale not offset as I have learned its better.
My Explorer: http://prntscr.com/lg40fb
Menu when in studio: http://prntscr.com/lg40j1
Menu in real server with bigger screen: http://prntscr.com/lg40mp
I do not have a clue as to why this is happening as everything is in scale so it should be positioning and sizing the same no matter the screen size but it's not.
In the frames and text labels there are things called anchor points. If you have the anchor point at (0, 0) it decides the positioning relative to the top left corner. However if you do something like (0.5, 0.5) it will decide where to put it relative to the middle of the GUI object. If you mess around with those and the parents of the objects you are moving around you might end up getting the result you desire.
An easy fix is to change all your sizes of the gui from x coord 2 to x coord 1 and y coord 2 to y coord 1, here is an example:
Example:
-- suppose your gui size is UDim2.new(0,1000,0,1000) -- change that ^ to: UDim2.new(1,0,1,0)
Another example:
Suppose your gui size is UDim2.new(0,400,0,400) -- change ^ to: UDim2.new(.4,0,.4,0)
After changing the GUI sizes, test your game and change the size of the screen, it will now stay fixed into which ever screen size you choose.
You could also program a script that detects the platform and change the gui like that but, it will be too much to handle, getting every latest phone created....
Click answer if this works.
Closed as off-topic by User#21908 and Vulkarin
This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.
Why was this question closed?