Typing S, O into a UDim2 property should set it to {S, O},{S, O}


As a Roblox developer, it is currently too hard to quickly set UDim2 properties. Right now, you can either expand the property, expand X and Y, then type the value into each of the 4 boxes, or type SX, OX, SY, OY into the box. I am proposing that typing S, O into the property box would apply the Scale and Offset values to both X and Y. Typing one number would automatically fill the Offset value in with 0.

The AnchorPoint property already does this. If you type # into the box, it is automatically set to #, #. This is very useful for setting the AnchorPoint, and could be a huge time-saver if this feature was expanded to UDim2 as well.

1{1, 0}, {1, 0}
1, 5{1, 5}, {1, 5}

If Roblox is able to address this issue, it would improve my development experience because it would make it extremely quick and easy to set a Gui object’s position or size to something that uses the same number for Scale and Offset for X and Y.

This feature request originally only asked for typing in one number for scale, but I changed it to support both scale and offset.


I’d actually prefer it to set Offset rather than Scale, as that’s what I use most often. This is probably the reason why the top-level Position field doesn’t support it, but the individual X and Y attributes do.


Interesting. I rarely use offset because of how it messes with scaling on different screen sizes.

Say you’re trying to make a frame perfectly centered inside of another frame (which is my main use case). Would you use offset for that, or scale? It seems like setting it to {0.5, 0}, {0.5, 0} would be easier to do than manually doing half of the parent’s offset values.

A setting to switch between auto-correcting to offset or scale would fix that problem though.


I would use Scale in that scenario, although I have a script in InCommand that automates the centring process for me (Position and AnchorPoint).

Yes, a setting would be the best answer here, although a bit of logic would work too. Values of 1 or below could be assumed as Scale and anything above 1 converted to Offset, since Offset uses integers and it’s unlikely you’ll be setting Offset to 1px in general (an edge case might be a dividing line).

1 Like

I don’t support this, you can easily clone a frame and just use reclass by Elttob to change it into a different UI element:

Reclass - free, intelligent class conversion - Resources / Community Resources - Roblox Developer Forum

Even if that’s too tedious why would Roblox want to implement this feature? It would only help in a small amount of cases.

Offset is probably even more useful than scale. Offset and AspectRatios are the 2 things you need to make a UI element to be consistent across all devices.

1 Like

Maybe the top level UDim2 property should take input of the form s, o, rather than just #. Then you can be explicit about the values for both scale and offset to be duplicated to both X and Y. If you enter only the first argument, it should just default to s, 0 and set offset to 0, since that would be most expected.

I waste a lot of time with UDim2 properties as well, it takes so many arrow taps on my keyboard, or precise mouse clicks to change the default frame properties from a square to something that fills the entire UI container for example, and I have to do this constantly.

To add, i just discovered this input takes sx, ox, sy, oy already, but shorthand is always appreciated, and would make this shorthand easier to discover if there was shorthand for the shorthand (since this thread exists, people have clearly tried entering only one number).


This is perfect! I like this idea better so I’ll edit my post with this in it.

Thanks for the tip, I didn’t know that.