Expression Evaluator can run generic Lua code

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, 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, despite that text being invalid as it is.

I thought that reselecting the object would revert the text back to the actual value, not “”

It should?

1, 2, 3          | 1, 2, 3 |     |
[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.

This isn’t a bug, I think it’s perfectly fine.

You can actually do stuff like this:

x = 1 _G.Num = function() x =x + 1; return x; end

in the console, and then


Which is cool.


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.


Alright fair enough.
I just thought it was weird that it can interact with Roblox variables that aren’t relevant to the mathematical components.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.