Glorpia Docs
Scripting / Method

Clone()

Creates an unparented deep copy of an instance and its cloneable descendants.

Syntax

instance:Clone()

Return value

NameTypeDescription
returnInstanceA new copy with a new instance ID. The cloned root starts with Parent set to nil.
The complete supported child hierarchy is copied recursively regardless of the root class. For example, cloning a Part also clones a Script inside that Part and every supported child under that Script. Every cloned descendant receives a fresh instance ID. ObjectValue references that point inside the cloned tree are remapped to the matching cloned target; external ObjectValue references remain external. Runtime-owned service roots and Player instances cannot be cloned.

Example: Duplicate A Model

Luau
local template = workspace:WaitForChild("Crate")
local copy = template:Clone()

copy.Name = "CrateCopy"
copy.Parent = workspace
copy:PivotTo(CFrame.new(0, 8, 0))

Parenting the clone

The returned root is not placed into the hierarchy automatically. Set its Parent when the copy is ready to become part of the game hierarchy.

Related