Gui scaling and position different in game

Hello developers,
I have made a few guis for my game but It’s very hard to get the scaling and the position right, I use a plugin called AutoScale Lite which is used for fitting guis on all devices. I watched a tutorial on how to do this and use position scale and size scale in unit conversion in the plugin:

AutoScaleLite

ScaleAndScale

But in game its different than in roblox studio.

In roblox studio:

And in game:

See how the scaling and the position looks different.
Can anyone help me?

2 Likes

Is your window size in studio max screen? If you are using a smaller window in studio than in game, then the resolution will not match and so the UI won’t be quite the same. Always edit UI scaling on the resolution you’d play on.

3 Likes

I just took a screen shot like this:

I don’t use the plugin, but are you using UIAspectRatioConstraint?

This solution helped me, and it should help you with this, especially the section on UIAspectRatioConstraint… just make sure to apply the settings as it instructs in #3:

I’m not using UIAspectRatioConstraint.

I know…u should be to solve your problem. You need to add it in to your frame and your buttons.

It is an element in studio, not a separate plugin or anything… it helps keep the buttons constrained to the aspect of its parent.

Alright I will try use this method and test it

I tried this in my default baseplate game but the scaling looks a little off.

In roblox studio:

In game:

Please show me your properties on your button

1 Like

Here’s my propertys for my text button:

Propertys

I mean the information when you select TextButton that appears on the right…all the property information where it shows position and size.

Also do the same for the UIAspectRatioConstraint

The propertys are just default:

So your size is offset instead of scale… use scale, you will have to play around with number to find the size u like, but using scale will keep the same size across different screen resolutions… this will be your fix. Keep in mind scale numbers are very low, usually under 1.

Example:

Also, the same will apply to Position.

Do you mean by something like this?

Propertys3

Yes but now show me the UIAspectConstraint, but yes this is good.

I didn’t customize the UIAspectConstraint I’ve never used it before

ok so just set the property AspectType to ScaleWithParentSize. It will also keep buttons square, so play with the aspect ratio to get what you like.

Well now I cant scale the part or anything

Even without the UIAspect you will notice the buttons remain the same size when you play on different devices.

The UIAspect will keep all the buttons in the same aspect to each other regardless how big or small the screen gets. To test, go into emulator and see it change (or not change).

Remove it for now if you dont need it… the scale was the important part.