With certain properties types like Vector3, you can enter any text you want into the property field. Since the expressions are handled in Lua, it’s possible to execute generic Lua code using this, up to an extent.
As far as I can tell, this bug can’t really be exploited, since this only exists in the studio UI, and it only has as much power as the command line.
However if you input something that can be parsed by Lua, like BrickColor.new(), the value gets stuck there until you enter a valid expression or select a different object. So if you were to try and input an expression that can’t be parsed by Lua, it will revert the text back to BrickColor.new(), despite that text being invalid as it is.
WHAT I SET IT TO | WHAT IT DISPLAYS AFTERWARDS
----------------------------------------------
1, 2, 3 | 1, 2, 3
BrickColor.new() | BrickColor.new()
Color3.new() | Color3.new()
[reselect obj] | 1, 2, 3
([reselect obj] being unselecting and reselecting the object)
Seems like the actual value doesn’t change when the evaluation fails, it just doesn’t visually update.
I don’t see any bugs here. It is intentional that we are evaluating Lua code here. This allows you to write complex math equations in a familiar language.
This is intended behavior. Studio will show a red outline around the invalid value until you correct it. Undoing will cause the value to go back to the last valid value.