Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Clone a model, but exclude one part of the model?

Asked by 8 years ago

I would like to know how to clone a whole model, but exclude one part without doing :

local newtycoonpart1 = game.ServerStorage.tycoon1.owner:Clone()
        newtycoonpart1.Parent = workspace
        newtycoonpart1.Value = player.Parent.Name
        local newtycoonpart2 = game.ServerStorage.tycoon1.Buttons:Clone()
        newtycoonpart2.Parent = workspace
        local newtycoonpart3 = game.ServerStorage.tycoon1.mandropper1:Clone()
        newtycoonpart3.Parent = workspace

but instead just exclude one part from cloning. How would I do that?

1 answer

Log in to vote
1
Answered by
thePyxi 179
8 years ago

You can be able to implement a "WaitForChild" so that once the child has been found, which should be an instant, it would be destroyed.

local newtycoonpart1 = game.ServerStorage.tycoon1
newtycoonpart1.owner:Clone().Parent = workspace
newtycoonpart1.owner.Value = player.Parent.Name

local find = newtycoonpart1:WaitForChild("Put the name of the model here")
find:Destroy()
Ad

Answer this question