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

How Module script local value?

If I require this module script can I access tableA or do I have to access it through the functions? If it is a local value can I get the table value in the module from the script?

Module script;

tableA = {}
local CM  = {}

function CM.GetTA()
	return tableA
end

return CM

Script;

local CM = require(Module)

local tableA = CM.GetTA() --this or
CM.tableA --this

1 answer

✓ Accepted answer

I believe you can have a variable that looks like this,

CM.Variable = "Whatever"

Then you can access it like,

local CM = require(Module)
local newVariable = CM.Variable

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