How to get the logic behind 'UIScale' to happen automatically?

Hi, I’ve been a big advocate for using scale for gui design instead of offset; however it just doesn’t work well for my current UI i’ve made. So I had to resort to using offset only for the size/positioning values.

Though I was looking at Roblox’s new UI constraints and the DevForum, and noticed UIAspectRatioConstraint along with UIScale.

UIAspectRatioConstraint does the automation I want, but not the logic; see below.

UIScale does the logic I want, but not the automation; see below.

My question is; how do I scale it automatically like the logic of UIScale? (If the user’s screen can’t fit it, it shrinks)

1 Like

You really just have to use Scale rather then offset. If you use an Aspect Ratio it’ll stay in the shape you want it to.


Just use offset + UIScale and ditch UIAspectRatio

For something like this, it sounds like using scale exclusively for sizes and positions, and a UIAspectRatioConstraint, would be the best option.

Using scale for the size and position of elements will emulate the UIScale behavior, and the UIAspectRatioConstraint will handle keeping the frame the same relative size.


Yeah okay thought as much, just a shame since the UIScale does it perfectly. Why would they not allow a feature to make it have the same properties as UiAspectRatioConstraint :confused: