Mathematical shorthand operators have been broken in some numerical input boxes

In the Properties panel, a feature request was put in and implemented that allows you to use mathematical operators in number fields. For example, you can type 5*5 in a number field, and it will be transformed to 25 when you press enter.

This feature works great in some userdata entry fields such as Vector3. However, in UDim expanded input fields, “pure” number fields, such as LayoutOrder, Rotation, ZIndex, and in “range” number fields, such as Reflectance and Transparency, this feature is broken because the input boxes only accept numerical digits as input. If you attempt to type * or /, the input is ignored. This has been the case for a few months, but I do believe it to be a bug because it is inconsistent for this behavior to work in some number boxes but not all of them.

In the following video,I will attempt to write 5*5 in every box.

https://gfycat.com/CelebratedSerpentineAstrangiacoral

You can see that this shorthand works in the “text” form of UDim2s and Vector3s and in the expanded form of Vector3, but does not work as expected in the expanded form of UDims or numerical fields.

The “bug” in this case is that the code that only accepts digits as input does not account for arithmetic operators as being a valid input in some numerical fields, when they are actually valid.

12 Likes

This seems to work for Scale, but not Offset. I’ll add a bug for this.

2 Likes

I hope you’ll make it functional in normal Number fields as well?

1 Like

Which field(s) are you referring to?

Transparency, Reflectance, CollisionGroupId, BackgroundTransparency, LayoutOrder, Rotation, ZIndex… these are all Number properties but you can’t input anything other than digits and sometimes periods. You also can’t use the shorthand in the expanded form of Vector2s.

It’s just very inconsistent. I think it makes sense for these operators to work in all number fields.

1 Like

Unfortunately, this bug has still not been fixed. All properties listed above still do not allow math shorthands. Any update?

Sorry for the necrobump, but many properties still do not allow math operations.

1 Like

This bug is still not fixed, and it seriously interrupts my workflow. Whenever I have to do a mathematical operation to an AspectRatio property, for example, I have to minimize studio, open a calculator website, do the operation, then go back to studio. It would be a great quality of life improvement if this feature was extended to all number properties.

2 Likes

Apologies for bumping this dead thread but it looks like this is still an issue. You’re still unable to use operations for a UI’s size/position offset property but are able to use operations for scale.

1 Like