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 » Scripting Helpers
Home Search
 

Re: How big is the x-axis of the grid on studio?

Previous Thread :: Next Thread 
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
07 Nov 2014 03:22 PM
Also in games? It is to center Guis in the middle of the screen....?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
07 Nov 2014 03:25 PM
If you need to centre GUIs, then it's advised to position it at 0.5, -AbsoluteSize.X/2,0.5,-AbsoluteSize.Y/2

I'm probably wrong about the AbsoluteSize thing (Probably under a different name), but that's how it's done.
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
07 Nov 2014 03:28 PM
So this would center a gui? {0.5, 0},{0.5, 0}
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
07 Nov 2014 03:29 PM
No, that would center the top-left corner of the GUI.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
07 Nov 2014 03:30 PM
Of size {0, 0}, {0, 0}
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 03:42 PM
local size = yourGui.Size
local center = UDim2.new((0.5 - (size.X.Scale / 2)), -(size.X.Offset / 2), (0.5 - (size.Y.Scale / 2)), -(size.Y.Offset / 2))
yourGui.Position = center

Related
http://www.roblox.com/Forum/ShowPost.aspx?PostID=142192913
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
07 Nov 2014 03:48 PM
So basically it can just be .25?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 03:51 PM
No it depends on the size of your screen
Report Abuse
Cheeso135 is not online. Cheeso135
Joined: 13 Apr 2013
Total Posts: 2016
07 Nov 2014 03:56 PM
Oh.....So basically just keep testing right?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
07 Nov 2014 03:57 PM
No.
He told you exactly what to do stop being stupid.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Nov 2014 03:58 PM
No I gave you the equation for finding the center based on gui size
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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