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

Please Help! Cloning?

Asked by 8 years ago

I'm trying to make it load a model ID and then clone ALL of the scripts from the serverscriptstorage to the workspace.

Version #1-

require(318239676)

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

Version #2-

require(318239676)

GetChildren = script.Parent:GetChildren()

local clone = GetChildren:Clone()

clone.Parent = game.Workspace:WaitForChild()

for i,v in next,clone do
v.Parent=game.Workspace

end

Thanks, For trying to help! Ag800

1
code box :/ yoshi8080 445 — 8y
0
@yoshi8080 It won't work if you could help that would be great EvolutionaryCode 15 — 8y
1
It works. Select the code you want to put into a box, and press the Lua button. A row of ~~~ should be on its own line before and after each code block. BlueTaslem 18071 — 8y
0
I mean I need Help with my script. EvolutionaryCode 15 — 8y
View all comments (3 more)
1
In Version #1, try changing it to 'v:Clone().Parent = game.Workspace' nilVector 812 — 8y
0
What are the errors. Your first code looks fine. Shawnyg 4330 — 8y
0
The second one... I'm not sure.. You are cloning a table, you need to clone the objects. Use the for loop to clone the objects and then parent. lightpower26 399 — 8y

Answer this question