Clone (Function): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer m Reverted edit of Travisdep, changed back to last version by Mr Doom Bringer |
>Mr Doom Bringer No edit summary |
||
Line 11: | Line 11: | ||
<pre> | <pre> | ||
while true do | while true do --This uses the While Operator | ||
model = game.Workspace.Model:clone() --Right here, it creates a copy of game.Workspace.Model, and sets it as the variable "model" | |||
model.Parent = game.Workspace | game.Workspace.Model.Parent = nil --This sets the game.Workspace.Model's parent to nothing, removing it from the game. | ||
model.Parent = game.Workspace --Sets the cloned object's Parent to the Workspace. | |||
end</pre> | wait(300) --Waits for 300 seconds. | ||
end | |||
</pre> |
Revision as of 23:59, 10 March 2008
Clone( ) | |
Returns | Instance object |
Description: | Returns a copy of this Object and all its children. The copy's Parent is nil |
Example
while true do --This uses the While Operator model = game.Workspace.Model:clone() --Right here, it creates a copy of game.Workspace.Model, and sets it as the variable "model" game.Workspace.Model.Parent = nil --This sets the game.Workspace.Model's parent to nothing, removing it from the game. model.Parent = game.Workspace --Sets the cloned object's Parent to the Workspace. wait(300) --Waits for 300 seconds. end