Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Chrrxs/robloxstudio-mcp/llms.txt

Use this file to discover all available pages before exploring further.

Large Roblox places routinely have hundreds or thousands of instances that share configuration — environmental props with the same material, NPCs with the same attribute schema, scripts with the same deprecated API calls. Making those changes one instance at a time is slow and error-prone. The bulk operation tools in Roblox Studio MCP let an agent apply changes to many instances in a single tool call, eliminating per-instance round-trip latency and keeping the ChangeHistoryService stack clean for a single undo to reverse everything at once.

Bulk tool summary

ToolWhat it does
mass_set_propertySet the same property to the same value on an array of instances
mass_get_propertyRead the same property from an array of instances in one call
set_propertiesSet multiple properties on one instance in a single call
mass_create_objectsCreate multiple instances with individual classes, parents, names, and properties
smart_duplicateDuplicate one instance N times with per-copy offsets and property variations
mass_duplicateBatch multiple smart_duplicate operations together
bulk_set_attributesSet multiple custom attributes on one instance at once
find_and_replace_in_scriptsSearch-and-replace text across all scripts; supports dryRun preview

The paths array pattern

Tools that operate on multiple instances — mass_set_property and mass_get_property — accept a paths array: a JSON array of canonical DataModel strings, one per target instance. Build this array by:
  1. Calling get_descendants or get_tagged to enumerate the instances you want.
  2. Extracting the path field from each result entry.
  3. Passing the resulting array directly as paths.
// Paths array pattern — feed the output of get_tagged or get_descendants
{
  "paths": [
    "game.Workspace.Environment.Tree_01",
    "game.Workspace.Environment.Tree_02",
    "game.Workspace.Environment.Tree_03"
  ],
  "propertyName": "CastShadow",
  "propertyValue": false
}
DataModel paths are canonical strings of the form game.ServiceName.ParentName.ChildName. Spaces in instance names are fine — use bracket notation for names that contain dots or special characters: game.Workspace["My Folder"].Part.

Example: mass-change Transparency on 100 parts

You have 100 glass panel parts tagged "GlassPanel" and want to set them all to 30% transparency. The workflow is two tool calls: one to enumerate the tagged instances, one to apply the change.
// Step 1 — get all tagged instances
// tool: get_tagged
{ "tagName": "GlassPanel" }

// Step 2 — mass-set Transparency using paths from step 1
// tool: mass_set_property
{
  "paths": [
    "game.Workspace.Panels.GlassPanel_001",
    "game.Workspace.Panels.GlassPanel_002",
    "... (all 100 paths from get_tagged output)"
  ],
  "propertyName": "Transparency",
  "propertyValue": 0.3
}
This single mass_set_property call applies all 100 changes in one Studio bridge operation, recorded as a single entry in ChangeHistoryService.

Example: create 20 instances with varied properties in one call

Use mass_create_objects to build a set of spawn points with different positions without a create → set loop.
{
  "objects": [
    {
      "className": "SpawnLocation",
      "parent": "game.Workspace.SpawnPoints",
      "name": "Spawn_01",
      "properties": { "Position": { "x": 0,  "y": 0.5, "z": 0  }, "TeamColor": "Bright red" }
    },
    {
      "className": "SpawnLocation",
      "parent": "game.Workspace.SpawnPoints",
      "name": "Spawn_02",
      "properties": { "Position": { "x": 10, "y": 0.5, "z": 0  }, "TeamColor": "Bright red" }
    },
    {
      "className": "SpawnLocation",
      "parent": "game.Workspace.SpawnPoints",
      "name": "Spawn_03",
      "properties": { "Position": { "x": 20, "y": 0.5, "z": 0  }, "TeamColor": "Bright blue" }
    }
  ]
}
The entire set of 20 instances is created in one plugin round-trip. Each entry is fully independent — class, parent, name, and properties can all differ.

bulk_set_attributes

Set multiple custom attributes on a single instance in one call. This is more efficient than issuing a separate set_attribute call for each key, and the entire batch is recorded as a single ChangeHistoryService entry.
instancePath
string
required
Canonical DataModel path of the instance to set attributes on (e.g. "game.Workspace.NPCs.NPC_Goblin_01").
attributes
object
required
Map of attribute names to values. Supports primitive types (string, number, boolean) and complex types (Vector3, Color3, UDim2) via the _type convention used by set_attribute.
instance_id
string
Which connected Studio place to target. Required when multiple places are connected; omit when only one is open. Use get_connected_instances to list available IDs.

Example: initialise NPC attributes in one call

When setting up freshly created NPCs, bulk_set_attributes sets all required attributes on one instance per call instead of issuing a set_attribute call for each key.
{
  "instancePath": "game.Workspace.NPCs.NPC_Goblin_01",
  "attributes": {
    "MaxHealth":     100,
    "CurrentHealth": 100,
    "AttackDamage":   15,
    "MoveSpeed":       8,
    "Loot":          "Goblin_Loot_Table",
    "IsElite":       false
  }
}
To initialise many NPCs, combine mass_create_objects (create them all at once) followed by a bulk_set_attributes call per NPC. If the attributes are identical across NPCs, consider using set_attribute at the template level and then smart_duplicate with propertyVariations for any values that differ.

Example: find-and-replace across all scripts

find_and_replace_in_scripts is a bulk write tool for scripts. Use dryRun: true first to audit the scope of a change before applying it.
// Step 1 — dry run: see every line that would change
{
  "pattern": "workspace",
  "replacement": "game:GetService(\"Workspace\")",
  "caseSensitive": true,
  "dryRun": true
}

// Step 2 — apply once the preview looks correct
{
  "pattern": "workspace",
  "replacement": "game:GetService(\"Workspace\")",
  "caseSensitive": true,
  "dryRun": false,
  "maxReplacements": 200
}
The replacement is applied to every matching line across all scripts in one call, and the affected scripts are listed in the response.

Performance note

Every bulk tool is designed to complete its entire workload in one Studio plugin bridge round-trip. Compare the two approaches for setting a property on 100 instances:
ApproachRound-tripsChangeHistoryService entries
100× set_property100100 (100 separate undos)
mass_set_property11 (single undo reverses all)
The time saved compounds quickly in large places. Use the bulk tools whenever you are changing more than a handful of instances, and use undo if the result needs to be reversed — a single call undoes the entire batch.

Build docs developers (and LLMs) love