Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Changing Module Scripts from other scripts?

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?

1 comment

0

Pretty sure that would change the variable.

1 answer

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)


This discussion is preserved as it was. New answers, comments, and votes are closed.