Hello, to explain my issue, I will show you an example.
I created two ModuleScripts inside “ServerScriptService”
Here’s the Source Code for each:
ModuleScript “Test”
local TestModule = {}
TestModule.testValue = require(script.Parent.Test2)
return TestModule
ModuleScript “Test2”
local TestModule2 = {}
TestModule2.testValue = "Hello"
return TestModule2.testValue
So recreate these scripts, then open the Command Line in Studio, and type this code.
local test = require(game.ServerScriptService.Test) print(test.testValue)
This will print out “Hello”
Now, update the ModuleScript “Test2”
Change the “testValue” to something else, like
TestModule2.testValue = "Text updated"
then click on “Reload Script”
and then run this command again:
local test = require(game.ServerScriptService.Test) print(test.testValue)
What I expected, was that it prints out “Text updated”, however it printed out “Hello”.
And if I reload the the script that requires “TestModule2”, it still won’t update “testValue”.
Why does it not update?
The same thing goes for, when a script runs a function that was declared in a module script, which gets required by another module script and then a function gets run to replace the value, however it doesn’t update, as well, only if the function is from the first required ModuleScript from the script.