Hello, hope you are feeling well! I know I talk a lot about Private Modules even they were removed for Third Party Use (they can still be used by the owner). Well lets get to the question:
When Private Modules gets required from a Server Script, where does this Module goes to? In game, does this one replicates to the Client? (The module doesn’t have any backdoor to parent itself somewhere else).
require(123456789)
Sorry for repeating, will it get replicated or it will only be seen by the server?
It shouldn’t get replicated to the client, as far as I’m aware. It’s getting fetched on the server and being used by the server; I don’t see any reason why they’d replicate it to the client, but Roblox is Roblox so they might.
I’m not too sure about nil, the only ones I know of are Workspace, ReplicatedFirst, ReplicatedStorage, StarterGui, StarterPlayer, and descendants of their own Player object
Client accessible game locations (Workspace, PlayerGui, ReplicatedStorage) are different from the object existing in memory. It can exist in memory even if the script can’t be accessed in the game. Unfortunately, I don’t have a better answer. You would need to use a memory viewer to find your code, but I couldn’t tell you what it looks like as bytecode.
nil isn’t a table, but I know what you mean. nil is just saying ‘don’t store this anywhere’.
Two objects parented to nil aren’t parented to the same spot. It’s like how you can’t double infinity and get double infinity, infinity is a concept not a number.
No, the issue is understanding whether when the code is loaded onto the server, it also loads onto the client for no reason. That shouldn’t happen, it should be safe. But as Rogchamp said, Roblox is Roblox. We can’t be 100% certain without confirmation. But by all rational logic there is no reason for it to load onto the client.
It printed: ServerScriptService now the thing is, I heard roblox doesn’t replicate Server Side Code to the client. I also use this module across scripts which just like 2 are in the Workspace.
Yes you could require the module through a server-script (within game.ServerScriptService, though even if used within a container shared between the client and server the source isn’t compiled on the client) and no client would even know you’re requiring something anywhere.
I don’t think you can even require by id on the client anyway.
Because I was scared of something like it, I kept my module in use between ServerStorage and ServerScriptService. Now I just don’t know if the module replicates to the client lol. I am supper lost in that.
If the ModuleScript really is parenting itself to Workspace each time you require it from there, then that would be an issue because a ModuleScripts’s source is replicated to the client (as long as it’s in a client-readable area).
Exploiters are able to view Nil instances (whether this is shared between the client and server I have no clue), but as Rogchamp and JarodOfOrbiter said this shouldn’t be a problem unless Roblox decides to replicate the source to the client for whatever reason