generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Cloning items without wasting time

Previous Thread :: Next Thread 
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
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
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
26 Jul 2016 04:45 AM
bump

Ya happy now?
Report Abuse
iOwn_You is not online. 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 is not online. 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
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
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
uknowdudes is not online. uknowdudes
Joined: 10 Jan 2011
Total Posts: 993
26 Jul 2016 04:49 AM

@iOwn Thanks, it worked c;

Ya happy now?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image