how do you send newly created objects to the client through a remoteevents while streaming is enabled
in the same frame, i parent the model to workspace (model streaming type is persistent) and then fire the client with that model as an argument and the client tells me it’s nil unless the client receives the fire much later
i’m assuming that this is because it takes a few extra frames for the model to exist on the client because of streaming’s presence
i just need to know if there’s an easy fix to this because it breaks a lot of my code
Ultimately, this is the tricky part with no easy fix. When streaming is not enabled, sending instances without any additional yielding works, as long as we first define their parents (due to the ordered nature of replication). We cannot rely on the order when streaming is active.
WaitForChild() is the most classic way, except it requires some info. A remote can send a name and a parent for client to wait with.
Another, somewhat hacky idea is to send object values. In this context we can rely on the order of replication.
Workflow
Persistent model parented
Object value referencing the model descendant of any replicated service
Object value either found on the client with other events or sent in a remote signal
local model = objectReference.Value or objectReference.Changed:Wait()