If a server script clones an object from ReplicatedStorage and places it in the Workspace (or any other place that replicates), how is it replicated over to the clients?
Does it…
A) Send the raw data of the copied object and its descendants to every client?
OR
B) Does the server send a message to each client to tell it to copy the client’s cached version of the object from replicated storage?
I’m trying to understand this to see if cloning a certain object on the server will take a lot of bandwidth if I copy it in large numbers.
Items inside ReplicatedStorage are already loaded onto the client even before they are replicated onto the Workspace. When you load an item from ReplicatedStorage into workspace, the game will just tell the client the item exists and it’s position since the client already has a file of the item.
The point of ReplicatedStorage is to replicate items into both the server and client upon game startup.
Server-sided scripts, if in ReplicatedStorage, will replicate to the client - the instance itself still follows standard replication rules. Their sources (or more rather the bytecode for the script), however, are not sent to the client.
I think he was just making the point that if the server script is in a container that replicates (like ReplicatedStorage or the Workspace as in my demo thingy above) that the instance of the script object itself is still copied even if the code isn’t.