How do I center UIs?

I noticed that when I drag around a UI element in studio, there will be 2 green dotted lines it tends to snap to which I assumed would be the true center of the screen but when I join the game, the UI element is way off center. How do I center it properly without UIListLayout (It keeps giving me more problems that the amount I started with.)

anchor point could be set to 0.5, 0.5
and you could set the udim2 position to 0.5, 0, 0.5, 0

3 Likes

In addition to what @seanieplays said, One thing is to make sure you are using scale instead of offset for the size and position.

2 Likes

And to add to what @seanieplays and @Reditect both said, don’t click and drag UI elements, always change the size and position through the properties window.

2 Likes

How exactly would I do that?

Ignore

This text will be hidden

You click on the UI element, lets say a Frame or a Image Button… go into its properties in the explorer window, and find Size or Position. Expand it to show the X or Y values, then adjust the Scale value from there. Scale will be between 0 and 1.

2 Likes