Clone (Function)

From Goodblox Wiki
Revision as of 20:34, 23 September 2021 by Xyrafrost (talk | contribs)
Jump to navigationJump to search
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   --Starts up a While loop
     local model = workspace.Model:Clone()  --Right here, it creates a copy of workspace.Model, and sets it as the variable "model"
     
     workspace.Model:Remove()  --This removes workspace.Model from the game.
     
     model.Parent = game.Workspace  --Sets the cloned object's Parent to the Workspace.
     
     wait(300)  --Waits for 300 seconds.
end