I spent 3 months building an AI plugin that generates whole systems inside Studio — lessons learned


I want to share what I actually learned building this, because a lot of it was trial and error and I couldn’t find good answers on the forum.

1. RAG beats fine-tuning for Roblox-specific code

My first attempt was just prompting Claude directly. It hallucinated Instance APIs constantly (workspace.CurrentCamera:SetField() — not a thing).
Fine-tuning was overkill.

What actually worked: pgvector RAG over a curated dataset of ~2,000 code chunks pulled from:

  • DevForum solution posts in Help and Feedback
  • Official creator-docs examples
  • Top open-source Roblox repos on GitHub

At request time I embed the user’s prompt, find the 5-8 closest chunks, inject them into the system message. Hallucinations dropped ~90%.

2. Tool use loop beats single-shot generation

For whole-system generation, I had the LLM call tools in a loop:

  • read_script(path) — fetch existing script content
  • write_script(path, content) — create or update
  • create_instance(className, parent, props) — build hierarchy
  • run_command(lua) — execute inside Studio

The model plans, checks state, writes, verifies. Instead of one huge output, it is 8-15 smaller steps. Much less hallucination, recoverable mid-task.

3. Roblox Open Cloud for 3D asset upload is painful but works

I generate 3D meshes with Hunyuan3D (via Replicate), then upload via Open Cloud’s asset API. Gotchas:

  • Asset must be a valid OBJ with triangulated faces. Hunyuan outputs quads by default, had to add a triangulation pass
  • Upload is async — you get back an operationId and have to poll /v1/assets/operations/{id} until done
  • Returned asset ID is a string, has to be converted for MeshPart.MeshId = "rbxassetid://..."

Took me a full weekend to get right. Happy to share the exact code if anyone needs it.

4. HttpService with a localhost bridge for dev, Vercel for prod

During development I ran the LLM backend on localhost and the plugin hit http://localhost:3000. Studio’s HttpService allows localhost. For
production I deploy the backend to Vercel and the plugin talks to it over HTTPS.

5. What I would do differently

  • Start with tool use from day 1. I wasted 2 weeks on prompt engineering for single-shot generation.
  • Build the RAG dataset FIRST, model choice second. Switching Claude to GPT-4 made less difference than adding 500 more chunks.
  • Test with real DevForum-style questions, not clean synthetic prompts. Real questions are messy and context-poor.

Happy to answer technical questions about any of this — RAG setup, Open Cloud gotchas, tool use design, prompt structure, cost economics, whatever is
useful. If any of this helps someone else build their own Studio plugin, that is worth the post.

(The plugin itself is in private testing, not taking signups here — this post is about sharing what I learned.)

1 Like

you lost me 20 seconds into the video

13 Likes

I appreciate the audio glitches throughout the video that made me think my speakers got permanently damaged

From what I can tell: the entire topic, video, video visuals, video voice, and… the product itself is AI generated?

10 Likes

umm, what is an example game, that was created via this process that we can play?

who has the count of how many vibe coding plugins have been released this week?

5 Likes

And not even one actually works decently lol, they are just like a 7 year old with a F3X tool and a random scripting tutorial on youtube

1 Like

holy ratio

What is RAG ?? I don’t get what it does or stands for