I am currently working on creating a module, the contents of which doesn’t matter. When I create an object in that module I was experimenting with the __tostring metamethod. To do this, I was writing a function like so:
When I ran the same command as above I got the same output:
10:23:38.317 Hi - Edit
This leads me to believe that the command bar isn’t using the newest version of the script. My question then, is how do I get the script to “re-compile” so that the command bar is executing using the newest version of a script (Without closing and re-opening the place)?
But, to really make my life better, I just stopped using the command bar. I switched to HotSwap when I’m writing plugin code. The only caveat is when you press the run button, your scripts will also run, so you have to make it a point to disable stuff in your workspace.
I’ve encountered this issue before (requiring a ModuleScript from the command bar and it returning the same value, moreover table reference even when I’ve explicitly changed the table’s contents), from my experience renaming the ModuleScript and/or deleting it and recreating it with the new content seemed to work.
There’s actually a dedicated button for it up in the top right corner of the script menu, in the actions section:
Pressing “Reload Script” should cause it to reflect its changes everywhere else.