Clone (Function): Difference between revisions

From Goodblox Wiki
Jump to navigationJump to search
m (Undo revision 1266 by Rocket (talk))
Tag: Undo
Line 29: Line 29:
Objects with [[Archivable (Property)|archivable]] set to false are not cloned.
Objects with [[Archivable (Property)|archivable]] set to false are not cloned.


These classes are known to be unclonable: [[GBX.lua.Accoutrement (Object)|Accoutrement]], [[Workspace]]
These classes are known to be unclonable: [[GBX.lua.Hat (Object)|Hats]], [[Workspace]]

Revision as of 02:20, 22 September 2021

Function
Syntax Clone( )
Returns Instance object
Description: Returns a copy of this Object and all its children. The copy's Parent is nil
In Object: Global


Example

while true do
     model = workspace.Model:Clone()
     model.Parent = workspace
     wait(300)
end

or

while true do
     workspace.Model:Clone().Parent = workspace
     wait(300)
end

which does the same thing

Limitations

Objects with archivable set to false are not cloned.

These classes are known to be unclonable: Hats, Workspace