<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Juan Zabala</title>
    <description>The latest articles on DEV Community by Juan Zabala (@juanzab).</description>
    <link>https://dev.to/juanzab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3796986%2Fa8c26010-5ace-491d-a0ce-9cd8ef96f886.png</url>
      <title>DEV Community: Juan Zabala</title>
      <link>https://dev.to/juanzab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/juanzab"/>
    <language>en</language>
    <item>
      <title>How to Use Claude Code with Roblox Studio (Complete Guide)</title>
      <dc:creator>Juan Zabala</dc:creator>
      <pubDate>Fri, 27 Feb 2026 19:39:57 +0000</pubDate>
      <link>https://dev.to/juanzab/how-to-use-claude-code-with-roblox-studio-complete-guide-3n0a</link>
      <guid>https://dev.to/juanzab/how-to-use-claude-code-with-roblox-studio-complete-guide-3n0a</guid>
      <description>&lt;h2&gt;
  
  
  Claude Code Can Build Your Roblox Game — If You Set It Up Right
&lt;/h2&gt;

&lt;p&gt;Here's what happens when you run Claude Code in a Roblox project without any setup: it writes JavaScript. Or Lua 5.1. Or some weird hybrid that looks right but crashes the moment you hit Play in Studio.&lt;/p&gt;

&lt;p&gt;That's not Claude being dumb. It just doesn't know you're building a Roblox game. And honestly, why would it? Roblox uses Luau, a language that maybe 2% of developers outside the platform have even heard of.&lt;/p&gt;

&lt;p&gt;But give Claude the right context, and it goes from useless to genuinely scary good. I've watched it generate a full DataStore system with retry logic, proper error handling, and session locking in about 40 seconds. The kind of thing that would take me an afternoon to write and debug.&lt;/p&gt;

&lt;p&gt;The trick is a single file called &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Setup with Roxlit
&lt;/h2&gt;

&lt;p&gt;If you don't want to deal with any of the manual steps below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx roxlit setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command. It installs Rojo, configures the Studio plugin, creates your project structure, and generates the &lt;code&gt;CLAUDE.md&lt;/code&gt; file that makes Claude actually understand Roblox. You can skip straight to building.&lt;/p&gt;

&lt;p&gt;But if you want to understand what's happening under the hood (or you just like doing things yourself), keep reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Claude Doesn't Know Roblox By Default
&lt;/h2&gt;

&lt;p&gt;Claude Code is Anthropic's terminal-based AI. Unlike ChatGPT or other chatbots, it runs directly in your project folder. It reads your files, writes code, runs commands. Think of it as a developer sitting next to you who can type really, really fast.&lt;/p&gt;

&lt;p&gt;The problem? Out of the box, it has no idea about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Luau syntax&lt;/strong&gt; — it'll default to JavaScript patterns or vanilla Lua&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roblox services&lt;/strong&gt; — ServerScriptService, ReplicatedStorage, these mean nothing to it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rojo's file mapping&lt;/strong&gt; — the &lt;code&gt;.server.luau&lt;/code&gt; and &lt;code&gt;.client.luau&lt;/code&gt; naming convention&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roblox-specific patterns&lt;/strong&gt; — RemoteEvents, DataStores, the whole client-server architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found this out the hard way. My first attempt at "create a sprint system," Claude gave me a Node.js Express server. Not exactly what I needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Manual Setup (Step by Step)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install Claude Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @anthropic-ai/claude-code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need an Anthropic API key. Claude will ask for it the first time you run it. Typical Roblox development costs a few dollars per month in API usage. Not free, but way cheaper than the time it saves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install Rojo
&lt;/h3&gt;

&lt;p&gt;Rojo is the bridge between your code editor and Roblox Studio. Without it, Claude can write perfect code that just sits on your hard drive doing nothing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install aftman first (it's a tool manager — yes, a tool to install tools)&lt;/span&gt;
aftman add rojo-rbx/rojo
rojo init
rojo plugin &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;aftman&lt;/code&gt; gives you trouble on Windows, don't panic. It's a PATH issue 90% of the time. Close your terminal, open a new one, try again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create the CLAUDE.md File
&lt;/h3&gt;

&lt;p&gt;This is where it all clicks. Create a file called &lt;code&gt;CLAUDE.md&lt;/code&gt; in your project root. Claude reads this automatically every time it starts, and it shapes everything it does.&lt;/p&gt;

&lt;p&gt;Here's a solid starting point:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Roblox Game Project&lt;/span&gt;

&lt;span class="gu"&gt;## Language&lt;/span&gt;
This project uses Luau (not Lua, not JavaScript). Always write Luau code.

&lt;span class="gu"&gt;## Project Structure&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; src/server/ → ServerScriptService (server-only scripts)
&lt;span class="p"&gt;-&lt;/span&gt; src/client/ → StarterPlayerScripts (client-only scripts)
&lt;span class="p"&gt;-&lt;/span&gt; src/shared/ → ReplicatedStorage (shared modules)

&lt;span class="gu"&gt;## File Naming&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt;.server.luau → Server Script
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt;.client.luau → Local Script
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt;.luau → ModuleScript
&lt;span class="p"&gt;-&lt;/span&gt; init.luau → The script becomes the folder itself

&lt;span class="gu"&gt;## Key Patterns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use RemoteEvents for client-server communication
&lt;span class="p"&gt;-&lt;/span&gt; Use ModuleScripts for reusable code
&lt;span class="p"&gt;-&lt;/span&gt; Use DataStoreService for saving player data
&lt;span class="p"&gt;-&lt;/span&gt; Use task.spawn() instead of coroutine.wrap()
&lt;span class="p"&gt;-&lt;/span&gt; Use task.wait() instead of wait()

&lt;span class="gu"&gt;## Common Services&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Players: Get player objects
&lt;span class="p"&gt;-&lt;/span&gt; ReplicatedStorage: Shared assets and modules
&lt;span class="p"&gt;-&lt;/span&gt; ServerScriptService: Server-only code
&lt;span class="p"&gt;-&lt;/span&gt; ServerStorage: Server-only assets
&lt;span class="p"&gt;-&lt;/span&gt; UserInputService: Detect player input (client only)
&lt;span class="p"&gt;-&lt;/span&gt; TweenService: Smooth animations
&lt;span class="p"&gt;-&lt;/span&gt; RunService: Per-frame updates

&lt;span class="gu"&gt;## Anti-patterns to Avoid&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Never use wait() — use task.wait()
&lt;span class="p"&gt;-&lt;/span&gt; Never use Instance.new() without setting Parent last
&lt;span class="p"&gt;-&lt;/span&gt; Never trust the client — validate everything on server
&lt;span class="p"&gt;-&lt;/span&gt; Never store sensitive data in ReplicatedStorage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Customize this as your project grows. Add your game's modules, your naming conventions, whatever patterns you want Claude to follow. The more specific, the better the output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Start Everything
&lt;/h3&gt;

&lt;p&gt;Open two terminals. In the first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rojo serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then connect in Roblox Studio (Plugins tab &amp;gt; Rojo &amp;gt; Connect).&lt;/p&gt;

&lt;p&gt;In the second terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now tell it to build something. "Create a coin collection system with a leaderboard." Watch what happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Better Results from Claude
&lt;/h2&gt;

&lt;p&gt;The difference between "meh" output and "holy crap that actually works" is how you talk to Claude.&lt;/p&gt;

&lt;h3&gt;
  
  
  Be Specific About What You Want
&lt;/h3&gt;

&lt;p&gt;Bad prompt: "Make a save system"&lt;/p&gt;

&lt;p&gt;Good prompt: "Create a DataStore module in src/shared/ that saves player coins, inventory (a table of item IDs), and settings. Use UpdateAsync with retry logic. Include a function to load data when a player joins and auto-save when they leave."&lt;/p&gt;

&lt;p&gt;The second prompt gives Claude enough context to write production-quality code. The first one is a coin flip between decent and broken.&lt;/p&gt;

&lt;h3&gt;
  
  
  Point Claude at Your Existing Code
&lt;/h3&gt;

&lt;p&gt;If you already have scripts, Claude can read them and match your style:&lt;/p&gt;

&lt;p&gt;"Read all the scripts in src/server/ and then create a new weapon system that follows the same coding style and uses the existing PlayerData module."&lt;/p&gt;

&lt;p&gt;This is where Claude Code beats ChatGPT. It doesn't generate code in a vacuum. It understands your project's actual structure and builds on it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paste Errors Directly
&lt;/h3&gt;

&lt;p&gt;When something breaks (and it will), copy the error from Studio's Output window:&lt;/p&gt;

&lt;p&gt;"I'm getting this error: &lt;code&gt;ServerScriptService.CombatHandler:47: attempt to index nil with 'Character'&lt;/code&gt;. The script is in src/server/CombatHandler.server.luau. Find and fix the bug."&lt;/p&gt;

&lt;p&gt;Claude reads the file, finds the issue, and patches it. Usually faster than you'd find it yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Real Workflow Looks Like
&lt;/h2&gt;

&lt;p&gt;Here's a session from last week, building an obby checkpoint system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I told Claude: "Create an obby checkpoint system with auto-save"&lt;/li&gt;
&lt;li&gt;It created three files:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/server/CheckpointService.server.luau&lt;/code&gt; (saves progress to DataStore)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/shared/CheckpointConfig.luau&lt;/code&gt; (configuration)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/client/CheckpointUI.client.luau&lt;/code&gt; (notification when you hit a checkpoint)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Everything synced to Studio through Rojo instantly&lt;/li&gt;
&lt;li&gt;First test: the UI notification wasn't showing. Pasted the error, Claude fixed a missing RemoteEvent&lt;/li&gt;
&lt;li&gt;Second test: checkpoints weren't saving between sessions. Claude found it was using SetAsync instead of UpdateAsync&lt;/li&gt;
&lt;li&gt;Third test: worked perfectly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;15 minutes total. Writing that from scratch, with proper DataStore handling and client-server communication? A couple hours at least.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does Claude Code connect to Roblox Studio directly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Claude edits files on your computer, and Rojo syncs those files into Studio. You need both running. It sounds like extra work but it becomes second nature after a day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does Claude Code cost?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It requires an Anthropic API key with usage-based pricing. For typical Roblox development, expect a few dollars per month. Heavy usage might push that to $10-15.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Claude create 3D models or maps?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Claude works with code: scripts, modules, configuration files. You still design your world in Studio's visual editor. But Claude can write all the scripts that make those objects actually do things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code or Cursor for Roblox?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Depends on how you work. Claude Code is terminal-based, you type what you want and it builds it. Cursor is a full editor with inline AI and autocomplete. Both connect to Studio through Rojo.&lt;/p&gt;

&lt;p&gt;My take: Claude Code for greenfield work ("build me a combat system from scratch"). Cursor for editing existing code where you want to see everything side by side.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Setting all of this up manually is a rite of passage, but it doesn't have to be. &lt;a href="https://roxlit.dev" rel="noopener noreferrer"&gt;Roxlit&lt;/a&gt; handles the entire setup with one command: Rojo, the Studio plugin, project structure, and the CLAUDE.md file that makes Claude actually useful for Roblox.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>roblox</category>
      <category>ai</category>
      <category>gamedev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
