Hello, I would like to know how you can add value (or a player's name) to a module.
I have tried this,
table.insert(module, value)
table.insert(module, #module, value)
I am not the best at modules, as you can tell. Thanks :D
Hello, I would like to know how you can add value (or a player's name) to a module.
I have tried this,
table.insert(module, value)
table.insert(module, #module, value)
I am not the best at modules, as you can tell. Thanks :D
FYI, Module requires are synced across the same context level, so if a client requires a module, it will be different from the server version, just in case that's what you're trying to do.
But if your module returns a table it is as simple as just adding an entry to the module.
module[key] = value;
print(module.key)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Are you trying to do this from a server script?
Yes