Create a new Instance in the live game
create-instanceCreates a new Roblox Instance, sets optional Name/properties, and parents it to a path to spawn parts, GUIs, folders, or value objects for live debugging.
Instructions
WRITES LIVE GAME STATE. Construct a brand-new Instance via Instance.new(className), optionally set its Name and a list of initial properties, and optionally parent it into the game tree. Useful while debugging for spawning a Part, a Highlight/BillboardGui ESP marker, a Folder, a Value object (IntValue/StringValue/BoolValue), or any other class. PROCESS: Instance.new is pcall-guarded (returns a clean error if className is invalid); Name is set if provided; each property is set independently and pcall-guarded so one bad property does not abort the others (failures are collected into propErrors); Parent is set LAST (only if parentPath is given) so all properties are applied before the instance becomes live in the tree. If you do NOT pass parentPath the instance is created but left parentless (nil) — it still exists in memory and can be parented later via set-instance-property on its Parent. WARNING: a parented instance immediately affects the running game and may replicate. Returns { Created, ClassName, Parented, propErrors, ok } or { error }. Signature: { className: string, name: string?, parentPath: string?, properties: {{ name: string, value: { kind: "string" | "number" | "boolean" | "nil" | "raw", value: string | number | boolean? } }}?, 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 |
|---|---|---|---|
| name | No | Optional Name to assign to the new instance. If omitted the engine's default name for the class is kept. | |
| className | Yes | The Roblox class name to instantiate, e.g. 'Part', 'Folder', 'Highlight', 'BillboardGui', 'IntValue', 'StringValue', 'ScreenGui'. Passed to Instance.new(className); an unknown/non-creatable class returns a clean error. | |
| parentPath | No | Optional Luau expression resolving to the Instance that should become the new instance's Parent, e.g. 'game.Workspace', 'game.Players.LocalPlayer.PlayerGui', or 'game:GetService("ReplicatedStorage")'. Evaluated as `return <parentPath>`. Set LAST, after all properties. Omit to leave the instance parentless. | |
| properties | No | Optional list of initial properties to assign before parenting, e.g. [{ name: 'Anchored', value: { kind: 'boolean', value: true } }, { name: 'Size', value: { kind: 'raw', value: 'Vector3.new(4,1,4)' } }]. Omit or pass [] for none. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |