Please help me clarify this question. What I mean is what happens if I do this on the client’s side.
local model = workspace:WaitForChild("Model")
local modelClone = model:Clone()
model:Destroy()
Assuming that in workspace there is a model called “Model” with many children in it. So how would modelClone look? I mean, if I destroy the model before all the children are replicated, the modelClone will be left with less children? or maybe the children will keep replicating and cloning directly into the modelClone?
1 Like
I don’t really understand what you are trying do say, but since it is client side only one player will see it being cloned and deleted.
The should clone completely and the original will be destroyed.
So, no matter what, modelClone will be an exact copy?
Calling Clone()
already makes a copy of it, and you don’t have to worry, because lua waits for the previous line to pass before running the next, so it has to finish cloning before it runs the destroy command. Why not just test it out?
but on the client side the replication is done in the background, that’s why WaitForClild is necessary.
In Studio you can’t simulate the way instances are replicated or at least I don’t know how.
I understand that a Model (an instance of the Model class) keeps the information of all its children internally, so if I take out a clone, that information should also be copied or not, I don’t know. But if it is copied then modelClone would have the information of children that have not been replicated yet.
What a disappointment. I had hoped that the clone would always be complete.
So it doesn’t matter if I destroy the model or not, I could still end up with incomplete modelClone (in the case of dynamic parenting, of course).
I’ll do that. Thank you for your time and patience with me.
1 Like