Clone a live Instance
clone-instanceDuplicate a live Roblox Instance and all descendants, optionally parenting the copy into the game tree for debugging, templates, or extra item copies.
Instructions
WRITES LIVE GAME STATE. Resolve a Luau expression to a source Instance, deep-copy it via source:Clone() (which duplicates the instance and all of its descendants), and optionally parent the clone into the game tree. Useful while debugging for duplicating a template Part/Model/GUI, spawning extra copies of an item, or capturing a snapshot of a subtree before mutating the original. The clone starts parentless; it is parented LAST and only if parentPath is provided. NOTE: :Clone() only succeeds when the source's Archivable property is true — a clone of a non-Archivable instance returns nil and yields a clean error. WARNING: a parented clone immediately affects the running game and may replicate. Returns { Source, Clone, Parented, ok } or { error }. Signature: { instancePath: string, parentPath: string?, threadContext: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, resolved-target, explicit-mutation-approval. Produces: created-handle. Verify with: get-instance-properties. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parentPath | No | Optional Luau expression resolving to the Instance that should become the clone's Parent, e.g. 'game.Workspace' or 'game.Players.LocalPlayer.PlayerGui'. Evaluated as `return <parentPath>`. Set after the clone is made. Omit to leave the clone parentless (it still exists in memory). | |
| instancePath | Yes | Luau expression resolving to the source Instance to clone, e.g. 'game.ReplicatedStorage.Templates.Coin', 'game.Workspace.Model', or 'game.Players.LocalPlayer.PlayerGui.Main'. Evaluated as `return <instancePath>`. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |