Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I centre a Frame with SizeConstraint: RelativeYY?

I have a (UI) Frame with the Size: {1.12,0}{0.7,0} and a SizeConstraint: RelativeYY; what position should I make it to keep it centred?

1 answer

✓ Accepted answer

If you want a quick solution which works for any gui:

Step 1: Change the AnchorPoint of the frame to 0.5,0.5

Step 2: Change the Position of the frame to {0.5,0},{0.5,0}

This will keep it centred at all times, no matter what you do with its size. This also works for any GuiObject (which can be positioned) you come across.

This discussion is preserved as it was. New answers, comments, and votes are closed.