With the new Accurate Play Solo feature, there are some conflicts with accessing a module. When accessing a module via the client, the client has it’s own thread of the module and so does the server.
However, when accessing a module via the command bar, the command bar creates it’s own thread of the module and creates conflicts on the server or the client
If you haven’t noticed this behavior, feel free to try this out
1.) Create a module in ReplicatedStorage
2.) Name it “Module” and paste this code in it
local ModuleValue = 0
local module = {}
function module:SetValue(Value)
ModuleValue = Value
end
function module:PrintValue()
print(ModuleValue)
end
return module
3.) Create a script in StarterGui
4.) Paste this code in it
local Module = require(game:GetService("ReplicatedStorage"):WaitForChild("Module"))
Module:SetValue(10)
Module:PrintValue()
5.) Create a script in ServerScriptService
6. Paste this code in it
local Module = require(game:GetService("ReplicatedStorage"):WaitForChild("Module"))
Module:SetValue(50)
Module:PrintValue()
7.) Play the server and paste this code in the command bar in a single line
Module = require(game.ReplicatedStorage.Module); Module:SetValue(500); Module:PrintValue()
All the printed values should be different even if the command bar is either client-sided or server-sided.
I’m not sure if this is normal behavior, but shouldn’t the command bar be able to access the thread of the client? (It makes testing the module easier)