Why does a ModuleScript requiring a specific returned value from another ModuleScript not update when reloading the script?

Module scripts by definition load only once, that’s why changing the variables doesn’t do anything. However if a variable is a table, then this variable is a reference to the table in the memory. The variable itself can’t be changed to anything else, but the contents of the table can. The variable in the module script will still be pointing to that table in the memory, but the content of the table will be different. That’s why it works with tables (generally references), but not with ‘simple’ variables.

1 Like

Yes. I am not trying to make changes while the game is launching in the game module. Even though I tried that and it also didn’t update unless it gets updated by a function defined in the required ModuleScript that is located in that ModuleScript and, and not requiring another ModuleScript.

But if I go in the Script Editor, and make a change with these ModuleScripts requiring another ModuleScript, and test it in the command line, the value doesn’t update. And I was expecting “Reload Script”, to fix that issue and load the Module again. But it isn’t doing that.

Normally, everything in a Command Line after it was defined, should clear up, but it doesn’t seem to be the case. Somewhere when the script gets reloaded there seems still to be an issue.