|
| 26 Jul 2016 04:44 AM |
I haven't been on this site for months and i remember there was a function that you could clone a group of objects with just a line of code instead of doing this:
local a = game.workspace.thing:clone() local b = game.workspace.thing2:clone() local c = game.workspace.thing3:clone() local d = game.workspace.thing4:clone()
I know for a fact there's a much quicker way, but i don't even remember what it is.
Ya happy now? |
|
|
| Report Abuse |
|
|
| |
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 26 Jul 2016 04:45 AM |
a for loop?
for i,v in pairs (game.Workspace.Clones:GetChildren()) do clone = v:clone() clone.Parent = game.Workspace.Clones
end |
|
|
| Report Abuse |
|
|
iOwn_You
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 599 |
|
|
| 26 Jul 2016 04:47 AM |
actually what i did will create a endless loop, so dont make the parent the same folder, you could do
for i,v in pairs (game.Workspace.toClone:GetChildren()) do clone = v:clone() clone.Parent = game.Workspace.NewClones end |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 04:48 AM |
If it's too confusing then let's say this
In this scenario there's a group of objects you want to clone from one place to another, you can easily do this with that specific code
Ya happy now? |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 04:49 AM |
@iOwn Thanks, it worked c;
Ya happy now?
|
|
|
| Report Abuse |
|
|