Does requiring a module from client (local scripts) give each "client" a unique returned object

Hi, so I was curious about requiring a modulescript from a client, let’s say I require a module script that’s in the replicated storage, all server scripts that require that module will share the same “table” reference if I am returning a table, however on the client portion of it if I require a modulescript, will each client receive a unique table?


From prior experience, if I ever put a module script in ReplicatedStorage or smthn like that; then no, if you have a table in your module script and you index something on the server, the client won’t have those changes.

idk if I interpreted your post but if I did, that’s just what I’d like to add

1 Like

Essentially my question is when i’m requiring the modulescript from replicated storage, will each player have a unique table, or will they all share the same table as a reference?

1 Like

Each client creates their own table reference that cannot be shared cross-client. These references will have different HasIDs.

Off topic, a while back I wrote a simplistic analogy explaining cross-related data transfering:

Think of a client as a student sitting at a desk in class. Each student has a notebook. The notebook in this analogy is the table.

Each student can write in their own notebook. However the teacher (server) does not allow the students to write in other people’s notebooks. Likewise, the Teacher cannot write in your notebook as well.

Now imagine the teacher’s whiteboard. This is the teacher’s notebook. Everyone in the class can see and write what is on the whiteboard. However, this is only the case when the teacher writes it down on the whiteboard (aka. sending data through a RemoteEvent/RemoveFunction or displaying it in the Explorer). The Teacher also has their teacher’s notes, which the students cannot see (Server Scripts, Server Data, ServerStorage, etc…).


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.