Clone (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
Services cannot be cloned
>Camoy
Redirecting to Clone (Method)
 
(2 intermediate revisions by the same user 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              = [[Instance]]
|}}</onlyinclude>
|}
==Description==
{{Example|
<pre>
local Model = game.Workspace.Model
while true do
    local ModelCopy = Model:Clone()
    ModelCopy.Parent = game.Workspace
    wait(300)
end
</pre>
Services cannot be cloned
<pre>
local new_workspace = Workspace:clone() --> Unknown object class "Workspace" while reading XML</pre>
}}
 
== Limitations ==
*Objects with their [[Archivable (Property)|archivable]] property set to false are not cloned.
*Services cannot be cloned.

Latest revision as of 21:54, 27 December 2010

Redirect to: