Ok, so i have this gui, the button is {0, 250},{0, 50}
What is the middle position? It is offset, you can test here.
http://www.roblox.com/games/255925361/Super-Meat-Blob-NEW-PROJECT
Ok, so i have this gui, the button is {0, 250},{0, 50}
What is the middle position? It is offset, you can test here.
http://www.roblox.com/games/255925361/Super-Meat-Blob-NEW-PROJECT
The middle position would be UDim2.new(0.5, -size.X.Offset/2, 0.5, -size.Y.Offset/2).
size = size of object you are positioning, and not the parent GuiObject's size.
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Now its just positioned far to the right?
You should be subtracting the size of the object you're editing, and not the parent's
The size.X.Offset/2 and size.Y.Offset/2 should be negative
funny how I said subtract yet never actually did... Thank you @Fear
{0, 550},{0.5, 0} its positioned like this, and its right in the center.
It doesn't matter where the parent is positioned, you need to know the size of the object you want to center.. if the object is a direct descendant of a ScreenGui, all you need to to is set it to (0.5, 0, .05, 0)