How to make GUI centered on all screens

I know this question has been asked before, but every tutorial I’ve used, just doesn’t work. I don’t know what I’m doing wrong. I need a piece of text on the top of the screen, on on the middle, and one slightly below the middle. Nothing I try works. Thanks!

7 Likes

Use anchor position it’s really helpful

Anchor point changes where on the ui element you are measuring from. It is default to 0,0 which means that position is based on the top left corner. 1,1 would be the bottom right corner. Changing AnchorPoint to 0.5, 0.5 means that it’s positioning the middle of the gui where you set position to. For the other ones, just change the position and the anchor point. You might also need to put things inside of invisible frames which can help with organization and positioning. I can’t really give you exact values for anything else, but anchor point should be helpful. Though you can certainly do this without it.

The one on the top would be
Anchor point 0.5, 0
Position 0.5,0,0,0

The center would be
Anchor point 0.5, 0.5
Position 0.5,0,0.5,0

The one just below middle really depends on what you mean by slightly below middle.

15 Likes

Hi, I tried doing this and all that happens is this

I’m not sure if I’m doing something wrong, or what.

1 Like

Well the position stacks. So if that’s in another frame, then doing that to the textbox will put it exactly in the middle of that frame. So every parent above it needs to be positioned correctly too. In this case all parents would also need to be in the middle. What does your hierarchy look like?

Use AutoScale light, its the best method.

1 Like

Oh, that makes sense. I was using this in a frame and I didn’t think about that. Thank you!

1 Like

For a center frame you could do Anchor Point {0.5,0.5} and Position {0.5,0,0.5,0} and it will automatically be locked to the center of the screen no matter the aspect ratio. Make sure that the frame is using scale and not offset.

If something helps you make sure to mark it as a solution.

23 Likes