neongoo51
|
  |
| Joined: 12 May 2009 |
| Total Posts: 33061 |
|
|
| 01 Apr 2012 01:23 PM |
| I mean, really? I can't even execute the Clone() function on a brick in the command bar. |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2012 01:28 PM |
Are you sure you're actually giving the clone a parent?
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
neongoo51
|
  |
| Joined: 12 May 2009 |
| Total Posts: 33061 |
|
|
| 01 Apr 2012 01:31 PM |
| Wait, so you have to tell it what it's parent is, or else it won't work? That's the most stupid idea ever. Its parent should be workspace if I didn't tell it what its parent is. |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2012 01:32 PM |
No, it makes perfect sense. Instance.new() does the exact same thing, nothing happens if you don't give it a parent. It's the way it's always been and it's the way it will always be.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 01 Apr 2012 01:34 PM |
| game.Workspace.Part:clone(). Without specifying where the object is located the program can't figure out where the object is, it can't see. BTW You also have to specifiy which Part, perhaps by changing the name. |
|
|
| Report Abuse |
|
|
neongoo51
|
  |
| Joined: 12 May 2009 |
| Total Posts: 33061 |
|
|
| 01 Apr 2012 01:34 PM |
| Well, if you use Insert > Object without having any other object selected, most objects automatically spawn in workspace. So it makes sense that way. |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 01 Apr 2012 01:35 PM |
| Oh wait. Wrong idea. Yeh. You have to specifiy where the clone is to be put. |
|
|
| Report Abuse |
|
|
neongoo51
|
  |
| Joined: 12 May 2009 |
| Total Posts: 33061 |
|
|
| 01 Apr 2012 01:35 PM |
| Kools: I did. If I didn't, the output would print an error, which it didn't. |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 01 Apr 2012 01:39 PM |
It'd make sense for a cloned object's parent to be the parent of the original object but you can just do this -
function Clone(obj, par) local new = obj:clone() new.Parent = obj.Parent return new end |
|
|
| Report Abuse |
|
|