Hello, I was expecting this script to not work because according to the developer wiki, "ModuleScripts run once and only once per Lua environment and return the exact same value for subsequent calls to require."
However, I was able to change the value of something belonging to my module script.
inside a module script in ReplicatedStorage:
local module = {}
module.smileface = ":)"
module.func = function()
print(module.smileface)
end
return module
inside a server script in game.Workspace:
local module = require(game.ReplicatedStorage.ModuleScript)
local sadface = ":("
module.func()
module.smileface = sadface
module.func()
The output prints a smiley face then a sad face. I didn't expect this to work, though I am kind of glad it does. How come this is possible even though module scripts supposedly return the exact same value every time they are required?
I'm asking this question because I'm trying to find out if Modules can be manipulated at ease or not.

1 comment
so is it unwise to use modules to store values that are changed in the game?