How do I use UIAspectRatioConstraint

Hi, I have been working on an opening to my game where the Gui does a cool transition. When I tested it with other devices, the words went all over the place. I have heard about UIAspectRatioConstraints, but I don’t know how to use them. Here is where I am at:

You can see the project here: Morning Sunrise - Roblox

2 Likes

UIAspectRatioConstraint is a constraint to enforce a ratio in a GuiObject, simply insert one as the children of the GuiObject to have the enforced ratio effect, to set the ratio, just select the constraint and change the Ratio value.

This constraint is mostly used on something that must have the same size in X and Y axis, such as icons.

3 Likes

To make the Aspect ratio the right number:
1st get the absolute size.X and y on the ui element
2nd take a calculator and devide X from Y.
3rd insert aspect ratio in the object and set it’s value to whatever 4 digit number you got on the calculator.

5 Likes