generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Gui positioning

Previous Thread :: Next Thread 
Roa_d is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image