Clone||doc136407

September 20, 2022

Format

Instance:Clone()

Describe

Clone an instance object. All properties of the cloned instance object are the same as the cloned instance. After cloning, it exists in memory by default and needs to be manually set to the scene (setting the parent).

Return value

Type Describe
Instance Instance object

Code example

Create a part on the server and clone it.

local map = World.DefaultMap
local part = Instance.new("Part", map.Root)
local clonePart = part:Clone()
clonePart.Parent = map.Root