Roa_d
|
  |
| Joined: 16 Aug 2013 |
| Total Posts: 524 |
|
|
| 29 Oct 2016 11:03 AM |
Is there a way to make it so the gui stays in its damn positions for all players. People with different monitors and resolutions have guis which are in the middle of the screen where as someone with a bigger monitor aka the creator or people with a similar or same monitor have gui placed where it was placed in the studio. Any way to make it be in the same position regardless of a persons resolution and monitor size?
|
|
|
| Report Abuse |
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 29 Oct 2016 11:11 AM |
scale instead of offset
guis are like that
(xscale,xoffset,yscale,yoffset)
scale is precentage of the screen 0.000-1.000 (you can go above and below if you want to get out of the screen for some reason)
offest is size in pixels you are probably using offset, use scale instead.
|
|
|
| Report Abuse |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 29 Oct 2016 11:12 AM |
It's tricky, you must understand the role of Scale and the role of Offset in a game. A gui won't look the same across monitors of different sizes and resolutions, but you can make it proportional by achieving that balance between Scale and Offset.
Scale is proportional to your screen size, which means that (.5,0,.5,0) is the exact middle of your monitor. Offset is essentially pixels, the quantity of which depends on the monitor's resolution.
Screen size and screen resolution are NOT THE SAME THING. Understand this before continuing.
An example of how to use Scale and Offset together to make a square gui in the middle of your screen is as follows
Frame.Size = UDim2.new(0,200,0,200) -- notice we use Offset, we want pixels Frame.Position = UDim2.new(.5,0,.5,0) -- notice we use Scale, we want the position dependent on screen size
The reason that trying to make a square GUI with Scale would not work across all devices and monitors is because not all monitors are square. Most are rectangular, so a Size of (.5,0,.5,0) would NOT be a square even though the two values are equal, because they are PROPORTIONS of your screen. On a screen that is 1920x1200 pixels, a size of (.5,0,.5,0) would be the same as an offset measurement of (0,960,0,600)
|
|
|
| Report Abuse |
|