When a LocalScript calls remoteFunction:InvokeServer(), it will yield until any necessary replication processes are complete within the associated OnInvokeServer’s main thread.
For instance, if the OnInvokeServer function creates 10,000 parts in the game, then the client that invoked the function will yield until all 10,000 parts are completely replicated to that client. It does not yield server-side; only client-side.
I believe this behavior should be documented for RemoteFunctions.
I believe this is more general, i.e. any replication action that occurs between the remote function being received by the server and the remote function being returned will delay replication of the result.
For example: if the remote function starts, then does a task for 2 seconds, and within that task another thread decides to spawn in 10,000 trees, those will also delay the result AFAIK. Correct me if wrong though.
The documentation request here should be to document the behavior where everything replicates in order.