|
|
(10 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| {|
| | #REDIRECT [[Clone_(Method)]] |
| |<onlyinclude>
| |
| {{Function|
| |
| name = Clone
| |
| |arguments =
| |
| |returns = [[Instance]] object
| |
| |description = Returns a copy of this Object and all its children. The copy's Parent is nil
| |
| |object = Global
| |
| |}}</onlyinclude>
| |
| |}
| |
| | |
| ==Example==
| |
| <pre>
| |
| | |
| while true do
| |
| model = game.Workspace.Model:clone()
| |
| model.Parent = game.Workspace
| |
| wait(300)
| |
| end</pre>
| |
| ==or==
| |
| <pre>
| |
| | |
| while true do
| |
| game.Workspace.Model:Clone().Parent = game.Workspace
| |
| wait(300)
| |
| end</pre>
| |
| | |
| which does the same thing
| |
| | |
| == Limitations ==
| |
| Objects with [[Archivable (Property)|archivable]] set to false are not cloned.
| |
| | |
| These classes are known to be unclonable: [[RBX.lua.Hat (Object)|Hats]], [[Workspace]]
| |