I have a modulescript under workspace:
local module = {}
function module.set(n)
module.thing = n;
end
function module.get()
return module.thing
end
return module
and a normal script under workspace:
require(script.Parent.ModuleScript).set(25);
When i type
print(require(game.Workspace.ModuleScript).get())
from the command prompt, instead of giving me 25, it gives me nil.
You would think that after setting module.thing to 25 in the workspace script, requiring it from somewhere else to check the variable would be 25, but it is just the default value.
Is there a way to synchronize the variables in the module script, so I get 25 instead if nil?
