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 » Scripting Helpers
Home Search
 

Re: All About Using "Clone()"?

Previous Thread :: Next Thread 
ROBOFROG is not online. ROBOFROG
Joined: 04 Jan 2009
Total Posts: 1519
26 Aug 2014 08:07 PM
As the title states, I'm just curious on the "Clone()" instance, since the wiki doesn't really have much information on it. I'm curious on the following things:

* Does this actually create another copy of the object to manipulate?
* What are all the parameters it can be loaded with?
* If not answered previously, how can I specify where the object (in this case, script) is "cloned" to?

Thanks for reading, and I appreciate any information!
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
26 Aug 2014 08:08 PM
Copies the instance and all of its children


So if I have


Workspace
> Part
>> Script
>> Mesh

I say game.Workspace.Part:Clone().Parent = game.Workspace


makes a 2nd part with a Script and a Mesh
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
26 Aug 2014 08:09 PM
Yes
Nil
Define it as a variable or use a one liner like so:
ClonedObject = Object:Clone() -- can now be used like any other variable reffering to an object
ClonedObject.Parent = Workspace
Object:Clone().Parent = Workspace
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
26 Aug 2014 08:10 PM
^
Report Abuse
ROBOFROG is not online. ROBOFROG
Joined: 04 Jan 2009
Total Posts: 1519
26 Aug 2014 08:11 PM
Oh, that seems simple enough, thanks for the information thus far!

Based on your replies, I'm guessing what you set it equal to is the location it is then placed?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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