Need UI Support

Recently I started making uis inside of studio and today tried to make shop ui. I made like 40% and tested it on roblox and found out that it isnt in the middle as I did set it in studio.


I have no idea how do I set it so its going to be in middle in game. If any can help me ill be very happy!

4 Likes

Maybe is the auto scaling? Sometimes the position of it’s frames are changing.

1 Like

Could be but I checked and it isnt.

1 Like

Here is an easy fix.

Set the anchor point of your frame to ‘0.5, 0.5’ and then make the position the following: {0.5, 0},{0.5, 0}

Here are the results:
https://i.gyazo.com/7bec5ec85a769d5a348396bf37426fb6.mp4

3 Likes

To get something in the middle of the screen for all screen sizes and aspect ratios, you need to use scale.

Scale is the first number of each pair in the properties. The first pair determines the X position and the second determines the Y, so to make something in the middle you’d need to do {0.5,0} {0.5,0}. I would never recommend positioning anything with offset, but there are a few situations where you’d need to.

The anchor point needs to be (0.5,0.5). Not (0,0).

3 Likes

The answer to this question lies in the fact that you probably had a tab open when you were making this UI(maybe properties tab and others). This can effect your centering as roblox then takes the part of the screen you see and shows it centered on that part of the screen, so the centering isn’t accurate when you actually play the game.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.