Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to copy parts that are inside a model?

how?

i have a model that has parts in it, and i want to copy them, therefor copying the model's children (without copying the actual model itself) how

1 comment

0

are there multiple parts you want to copy??

2 answers

I hope I understand your question but here is a basic script that will copy your model parts and set the parent of the copied parts to the workspace, just put the script inside a model and click run.

for i,v in pairs(script.Parent:GetChildren()) do
	local part = v:Clone()
	part.Parent = game.Workspace
end

Sincerely, -ViktorCorvinus

Based on my understanding of what you've said, you can do a loop that goes for every child inside the model and clone it. For example:

local parent = game.Workspace.Model -- Change to location of the model
local kid = parent:GetChildren()

for i=1, #kid do
	local clone = kid[i]:Clone()
	clone.Parent = game.Workspace -- Change to parent of the clone
end

This script will basically clone everything single part in the model, one by one, and put them into workspace.

This discussion is preserved as it was. New answers, comments, and votes are closed.