See this for an explanation of what I mean with “control table” Programming in Lua : 8.1
Where I asked that if I had some ModuleScript that, I don’t know… it calls another ModuleScript that returns a value uhhh…
Well, I wasn’t able to get a updated result when reloading that specific module.
Then recently I found out that you can use
require() and provide it with an AssetID. This then will attempt to load a Model but specifically look for a ModuleScript called “MainModule”.
So you can do require(assetid) and yeah. Thing is, when you update this Model with the “MainModule”, using require(assetid) with the same assetid, won’t load the updated version.
I have to restart Studio or the game incase I used require() while starting the game.
So, I started thinking on why that would be so.
And the Lua docs say that require, well Lua’s native require has a control table, that is accessible through a global value called
_LOADED, so something similar like
_LOADED doesn’t seem to be accessible, and I was looking for a way that does a complete reload on everything that was done with require
wonder if it is possible