Instance replication question

Suppose the server instantiates a part in the workspace and then fires a remote event straight afterwards. By the time the client receives the event, is the part guaranteed to have been replicated and ready to use?

Edit: I am not asking about streaming enabled replication behavior, just the default one.

Use WaitForChild since there’s a small delay between the part being created and it being replicated, around 10 ms.

By default, using Streaming enabled, chances are no. In any case, this won’t ‘cause’ it to replicate.

If the object exists within that time period, and is not effected by content streaming, yes it will replicate.

However Keep in mind that with this example, the Server is being told to create a part in the workspace, which is a Container that is replicated to the client, which will be almost Instantly depending on specific conditions (such as latency). RemoteEvents will yield for a brief period of time when firing across client/server boundaries, but doesnt always mean it will always be like that, you you will likely need to wait before firing, othwerwise your part may just return nil, for yk, the not existing thing.

If the Part is only used for the Client, just Initiate it on the Client, in which you just tell the Server to send a request to all Clients, and then create the part from there.
Gives a reason to use the new UnreliableRemoteEvent

1 Like

Then, probably Im doing something stupid/risky on a system Im working on.
For now everything looks fine, but yeah, real latency could break it as far as I understand.

Im waiting for a parent event to fire, in order to fire the remoteFunction back to client with the part variable.

What would be the best way to wait before giving the return with the part ready?

What is ‘disappear’? If it’s outside of the streaming radius it will never happen automatically. You could put the part in a model and changing how it streams if this is indeed the case.