--- name: roblox-tooling description: "Use when setting up, fixing or reviewing Roblox tooling: Rojo, asset uploads, Wally/pesde, Rokit, Selene, StyLua, Lune, luau-lsp, CI." when_to_use: "Also when Studio doesn't show file changes, Rojo won't reconnect, meshes sync as grey boxes, uploads duplicate, packages won't resolve, lint or format gates fail on untouched files, CI publishes fail, or a team keeps overwriting each other." last_reviewed: 2026-11-28 sources: - original - https://create.roblox.com/docs/projects/rojo - https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/studio/importer.md - https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/scripting/sync.md - https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/reference/engine/classes/ScriptEditorService.yaml - https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/reference/engine/classes/ChangeHistoryService.yaml - https://rojo.space/docs/ - https://raw.githubusercontent.com/rojo-rbx/rojo/v7.7.1/src/cli/syncback.rs - https://raw.githubusercontent.com/rojo-rbx/rokit/main/README.md - https://raw.githubusercontent.com/LPGhatguy/aftman/main/README.md - https://raw.githubusercontent.com/UpliftGames/wally/main/src/resolution.rs - https://docs.pesde.dev/reference/manifest/ - https://raw.githubusercontent.com/lest-luau/lest/main/docs/backends.md - https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/README.md - https://lune-org.github.io/docs/ - https://create.roblox.com/docs/llms.txt --- # Roblox Tooling ## When to Load Rojo and Studio sync, asset uploads, packages, tool pins, lint/format, Lune and CI. Open Cloud keys and scopes: `roblox-cloud`. Writing tests: `roblox-debugging`. "Field-observed" = seen in the owner's projects; reproduce on your setup. ## Traps (symptom -> cause -> fix) - Studio shows an old tree -> the Rojo plugin syncs only from the server and port it is connected to; files on disk alone change nothing. Serve the checkout you edited and connect to it. A running serve also keeps its old tree after `*.project.json` edits or package installs (the next sync can delete instances): restart serve and reconnect. - Rojo drops the connection every time serve restarts -> the **stock plugin never reconnects after a server restart, whatever its Auto Reconnect and Confirmation settings** (field-observed, Rojo 7.7). Zero-click needs a patched plugin or a bridge that detects the new server, reconnects and accepts the sync for the matching place ID; otherwise reconnect by hand. - Meshes sync as grey boxes -> live sync can't set `MeshPart.MeshId`, terrain or CSG (Roblox's Rojo docs). Upload the mesh as an asset and reference its id, or import the built file (`rojo build`). Uploading with an asset-sync tool: keep its lockfile (next trap). - Uploads duplicate assets -> Asphalt-style tools skip unchanged files by lockfile hashes; a missing or stale lockfile re-uploads everything as new assets. Commit sources, catalog and lockfile together. - Importing thousands of meshes one at a time -> the Studio **Importer queue**: select many files, set one item (including **Creator** = the group), right-click -> **Apply settings to all**, then import all. Don't open several Studios. - Uploads from an agent or CI -> in-engine `CreateAssetAsync` reported "not available yet" (field-observed). Agent in Studio: the MCP's `open_cloud_invoke`, no key; a group game uploads to the group (`roblox-studio-mcp` §2). CI: an Open Cloud key with asset write scope for the group. - Two devs with Rojo overwrite each other -> Rojo owns code only; map, models and UI stay in Studio (Team Create). Each dev serves into **their own** dev place, `servePlaceIds` pins each project to its place, and everyone pins the **same Rojo version** in `rokit.toml`. - Stray duplicate folders keep coming back -> `$ignoreUnknownInstances: true` leaves Studio-only instances alone. Set it `false` on containers that hold only disk code (deletes anything not on disk); keep `true` on shared services with Studio-made content. A disk folder under `$path` named like an explicit project child creates two same-named folders (field-observed). - Rojo 7.7 serve crashes or stops applying edits -> its watcher can crash on atomic writes (a formatter's `*.tmp`, a package manager replacing `Packages/`). Never install packages while serving; format only changed files; restart serve. Before measuring, read back a just-changed value from the live peer. - CI publish rejected -> publishing needs a **user-owned** API key with `universe:publish` (+ `universe-places:write` to save versions); group-owned keys can't be granted publish (Roblox's Rojo docs). - "0 errors" while types are broken -> luau-lsp prints `TypeError:` lines, so a filter on lowercase `error` misses them. - Blender FBX import lands mirrored in X -> the Blender-to-Studio axis/handedness conversion itself can mirror X, not only a script's axis swap (field-observed). Fix it in the export, not the layout. Check with an **asymmetric** anchor (a marker at +X only): front/up anchors can't detect a mirror. ## Review checklist | Symptom | Check | |---|---| | Edits not in Studio | Which server/port is connected, which checkout it serves, restarted after project edits? | | Package won't resolve | Realm of each dependency, the constraint pair named in the error, lockfile diff | | Open Cloud publish breaks materials | `MaterialVariant` TexturePack ids (§5) | ## 1. Rojo and Studio sync - Roblox's Rojo docs: Script Sync, partially managed (Rojo owns code) or fully managed (repo builds the place). Separate environments should be separate games under one group (data stores and secrets are scoped to the game). - `rojo syncback` (7.7+) converts a **saved** place/model file (`--input`) into files by the project's `syncbackRules`; it is not live two-way sync and can delete or rewrite mapped files. Run `rojo syncback --dry-run --list --input ` first. - Don't mix MCP or Studio script edits with a running serve on the same tree without deciding which side wins; Script Sync and `rojo serve` are competing writers (§2). - Installing models into Studio while Rojo synced the same `.rbxm` stacked 3-9 copies per model (field-observed): count instances by name after every install. - Generated UI needs one source of truth: hand or MCP edits to a builder's output are wiped by the next install. Make installers refuse to drop or retype an existing instance, and back up replaced screens. ## 2. Script writes from plugins and MCP; Script Sync - Write source with `ScriptEditorService:UpdateSourceAsync(script, callback)`: it updates an open editor (and re-invokes the callback if the editor rejects a stale update). A raw `.Source` write can clobber in-editor edits. Read with `GetEditorSource` (not `.Source`) while a document is open. The callback may not yield; returning `nil` cancels. - Wrap each bounded mutation in `ChangeHistoryService:TryBeginRecording` / `FinishRecording(id, Commit)`. A `nil` id (another recording open, or solo playtest) means stop and report, not mutate unrecorded. `Cancel` undoes only work in progress, not a committed recording. Edit-time only. - Script Sync syncs only `Script`, `LocalScript`, `ModuleScript` and `Folder`, and **ignores scripts with attributes or tags** (Studio warns of data loss). Resume conflicts are **Keep Studio vs Keep Disk**, not a merge; "Resume conflicted sync on place open" defaults to Do not resume. Limits: 10,000 scripts per top-level synced instance, 128 top-level instances. Concurrent Team Create edits to one synced script overwrite each other, and merging a Git branch doesn't update the place. Stop sync in Studio before deleting a synced folder on disk. ## 3. Packages and tool pins - Rokit is the tool manager for new projects; Aftman is archived and Rokit reads `aftman.toml`/`foreman.toml`. Rokit pins CLI tools, not dependencies. Don't migrate managers during feature work. - Wally: a bare version spec (`1.2.0`) is a caret range, not a pin. The resolver doesn't backtrack: read the named conflicting constraint before touching the lockfile, and don't delete a lockfile as a default fix. Realms: a shared `[dependencies]` entry can only use a `shared` package; server and dev sections can use any realm. `wally package --list` is the publish dry-run (there is no `--dry-run`). - Wally link modules don't pass exported types: re-export the types you need from a local wrapper. pesde reads Wally packages via `[wally_indices]` but needs a `sourcemap_generator` script for their types; commit `pesde.lock`. ## 4. Tests and CI - Split suites by what the runtime provides: pure logic in a plain Luau VM; file/HTTP/place-file work in Lune; engine APIs only in a real place. Mocked Instances produce tests that verify the mock. - lest exit codes: `0` passed, `1` test failures, `2` tool error (nothing ran). Its Studio backend is edit-mode `RunScript` (place scripts don't run, physics doesn't step, `IsClient()` and `IsServer()` both true) and refuses to run under `$CI`; engine suites in CI use the cloud backend. No backend covers input, hover, rendering or sensors. - Gate on parsed results (JUnit/JSON) or expected artifact counts, never exit code alone: a runner can exit 0 while running nothing. Never mask flakes with an unconditional retry. - Run Selene and `stylua --check` in CI (no rewrites there). Regenerate the Rojo sourcemap after moving modules or suffixes; a stale map makes correct code look broken. ## 5. Field-observed failure modes - **Edit-mode `require` cache:** an edit-time builder keeps old code after a module edit. Require a clone; luau-lsp rejects `require(x:Clone())`, so cast: `(require :: any)(m:Clone())`. - **`MaterialVariant` on Open Cloud publishes:** a Rojo-built place published through Open Cloud needed each variant's TexturePack asset set explicitly, or clients logged "Failed to load MaterialService.". ColorMaps load only from uploaded asset ids. - **`Content` properties (2026-11):** new `*Content` properties sit beside legacy asset properties; `Content.Object` values don't replicate yet. A Rojo + Lune deploy broke until Lune was updated: check serializer support first ([thread](https://devforum.roblox.com/t/changes-to-asset-properties-content-property-serialization-switch/4975546)). - **Lune 0.10.x:** `CFrame.lookAt(at, target)` faced away (build with `CFrame.fromMatrix(at, look:Cross(up).Unit, up)` and compare with Studio); a UTF-8 BOM (PowerShell `Set-Content`) broke file reads; `BasePart.Position` missing (use `CFrame.Position`); `Image` reads as `ImageContent`. - **Release isolation:** keep next-release work in a worktree whose sync is disconnected from the candidate place, and inspect Studio before publishing; a clean commit doesn't prove the installed payload. Release gates: `roblox-publish-checklist`. ## 6. Docs for agents - Route first: `https://create.roblox.com/docs/llms.txt` (top index), `/docs/reference/engine/llms.txt` (Engine API, Luau in-experience), `/docs/cloud/llms.txt` (Open Cloud HTTP). - Append `.md` to any docs URL for page source. For machine-checkable answers read `https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/reference/engine/classes/.yaml` (types, security, capabilities, `Deprecated` tags).