Reset variable environment of command bar

As a Roblox developer, it is currently too hard to use the command bar to test small pieces of code. When setting a non-local variable, that variable will persist in the environment used for future commands. I would like a button to allow me to reset the environment of the command bar, wiping out all previously set non-local variables. The environment is not currently wiped until a new instance of Studio is opened.

Right now, for example, I may set the non-local variable Car, which I want to reuse across multiple commands. However, if I forget to unset that variable, I may receive an unexpected result from a future command. If I could clear the environment, this issue wouldn’t exist, because it would be obvious I had forgotten to redefine Car after clearing the last definition. A key binding for this would be helpful.

This would improve my development experience by allowing for more rapid iteration through testing small pieces of code quickly, without having to worry about pollution of the global environment interfering with future commands.

8 Likes