Just realised the bug is different to what I first thought, so I’ve changed this post to match. ( I originally thought the “script” variable in ModuleScripts required by AssetId was incorrectly referencing a blank ModuleScript, however I now know the actual issue is as below )
Setting the parent of a ModuleScript required by AssetId to ReplicatedStorage doesn’t replicate the Source of the Module, causing anything to require it on the client to error.
Happens every time in my testing
You can reproduce this bug by:
- Creating a ModuleScript with the following code, named MainModule:
script.Name = "Hi"
script.Parent = game.ReplicatedStorage
return nil
- Upload that ModuleScript to Roblox and copy the AssetId
- Make a script in ServerScriptService and require the copied AssetId
Now start Play Solo and notice the ModuleScript has no Source on the client version
This happens with the latest version and I’m not sure when it started