Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing Module Scripts from other scripts?

Asked by 6 years ago

Can you change the table in a module script from a different script? Like something like this:

local table = require(modulescript)


table = newstuff

Does that change the module's table or the variable?

0
Pretty sure that would change the variable. NotInventedHere 158 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

What you can do is have a variable that changes to newstuff, or whichever module scripts you need. Then use requirement with your variable

moduleName = MyModule

table = require(moduleName)

modulename = SomeOtherModule

table = require(modulename)


Ad

Answer this question