I am trying to use multiple ModuleScripts parented to a “master” ModuleScript. The “master” ModuleScript contains all of the main things (variables like main frames, objects, values, etc.) and then I need the “children” ModuleScripts to use those variables.
The problem? - The ModuleScript uses an OOP approach, giving each module.new()
variable a new “environment”, for lack of a better word. Because the “children” ModuleScripts are not part of the “master” ModuleScript, they do not get the same treatment. Each time module.new()
is called for the “children” ModuleScripts, they also create new “environments”. They don’t link to the “master” ModuleScript, which is expected.
I am essentially trying to link the “master” and “child” ModuleScripts so that when module.new()
is called, they are all in the same “environment”.