Can you change the table in a module script from a different script? Like something like this:
1 | local table = require(modulescript) |
2 |
3 |
4 | table = newstuff |
Does that change the module's table or the variable?
What you can do is have a variable that changes to newstuff
, or whichever module scripts you need. Then use requirement with your variable
1 | moduleName = MyModule |
2 |
3 | table = require(moduleName) |
4 |
5 | modulename = SomeOtherModule |
6 |
7 | table = require(modulename) |