function CloneAllChildren(OldPar, NewPar) for _,v in ipairs(OldPar) do v:Clone().Parent = NewPar end end CloneAllChildren(Workspace.Model, Workspace)
would that work like that? (even though am doing something else)...
This is how you do it.
local Children = {} -- leave this empty function Copy(Parent) -- Parent is the object that you want to get all of the child for i, object in pairs(Parent:GetChildren()) do table.insert(Children, object) end end function Paste(Parent) -- Parent here is the parent you want to paste to for i, child in ipairs(Children) do child.Parent = Parent table.remove(Children, i) end end Copy(Workspace.Model) Paste(Workspace)
Um, I don't believe the variable "v" was necessarily designed as a part/model so it wouldn't be able to be "cloned." Therefore, it wouldn't work regardless. I also am not sure why "CloneAllChildren" is down on the bottom.
It's just pretty confusing. I'd say that script is both beyond repairing and nil.
People, CALM DOWN. It only takes a few lines goddamnit. e_o You dont need all of that 17 line stuff ._.
function CloneAllChildren(OldPar, NewPar) for i,v in pairs(OldPar:GetChildren()) do v:Clone().Parent = NewPar wait() end end CloneAllChildren(Workspace.Model, Workspace)
This'll work as long as the destinations are valid.