How to Connect Cursor to Roblox Studio (Step-by-Step Guide)
Learn how to connect the Cursor AI code editor to Roblox Studio in under 5 minutes. Complete setup guide with Rojo, file syncing, and AI-powered Luau development.
The Short Answer
You can't connect Cursor to Roblox Studio directly. There's no plugin, no extension, no magic button. But you can connect them through a tool called Rojo that syncs files between your computer and Studio in real time. Every edit you make in Cursor shows up in Studio instantly.
The entire setup takes about 5 minutes if you know what you're doing. The first time, though? I spent the better part of an evening fighting with PATH variables and wondering if I was breaking my computer. That's normal.
Here's how to do it without the suffering.
The One-Command Way
If you just want this done:
npx roxlit setup
Roxlit installs Rojo, configures the Studio plugin, creates your project folders, and adds a .cursorrules file so Cursor actually knows how to write Roblox code. Open the folder in Cursor and you're building.
But if you want to understand what each piece does — or you're the kind of person who assembles IKEA furniture without the manual — here's the full breakdown.
Why Bother Connecting Cursor at All?
Roblox Studio's built-in script editor works. It's fine. But "fine" stops being fine once you've used an AI editor that can:
- Write an entire DataStore module from a one-sentence description
- Autocomplete Luau code that actually makes sense (not just random suggestions)
- Edit multiple scripts at once while understanding how they connect
- Refactor 500 lines of spaghetti code in 30 seconds
Cursor is built on VS Code, so you get all the extensions, keybindings, and multi-cursor editing you're used to. Plus an AI that can write code, answer questions about your project, and debug errors — all inside the editor.
The catch is that Cursor has no idea what Roblox is. We'll fix that.
The Manual Setup
What You'll Need
- Roblox Studio installed and logged in
- Cursor installed (grab it from cursor.com)
- A terminal — Command Prompt or PowerShell on Windows, Terminal on Mac
That's it. No other accounts, no paid subscriptions, nothing else to download (yet).
Step 1: Install Aftman
Aftman is a tool manager. Yes, you're installing a tool to install another tool. Welcome to developer tooling.
# Windows (PowerShell)
irm https://github.com/LPGhatguy/aftman/releases/latest/download/aftman-windows-x86_64.zip -OutFile aftman.zip
Expand-Archive aftman.zip -DestinationPath aftman
./aftman/aftman self-install
# Mac
brew install aftman
If Windows gives you an error about execution policies, run PowerShell as administrator and try Set-ExecutionPolicy RemoteSigned first. Then close and reopen your terminal.
Step 2: Install Rojo
Rojo is the actual bridge between your files and Studio. Create a project folder and set it up:
mkdir my-roblox-game
cd my-roblox-game
aftman init
aftman add rojo-rbx/rojo
Step 3: Initialize the Project
rojo init
This creates default.project.json (tells Rojo how to map your folders to Roblox services) and a basic src/ directory.
Step 4: Install the Studio Plugin
rojo plugin install
This drops a plugin file into your Roblox Studio plugins folder. You can also search for "Rojo" in Studio's Plugin Manager if you prefer doing it that way.
Step 5: Start the Rojo Server
rojo serve
Keep this terminal open. It's watching your files and pushing changes to Studio whenever you save. Close it and the connection dies.
Step 6: Connect in Studio
- Open Roblox Studio
- Go to the Plugins tab
- Click Rojo
- Click Connect
You should see "Connected" in the Rojo panel. If it says "Not Found" — make sure rojo serve is actually running in your terminal.
Step 7: Open in Cursor
Open your my-roblox-game folder in Cursor. Create a file like src/server/Hello.server.luau, type some code, save it — and watch it appear in Studio's ServerScriptService.
That moment when your first file syncs? Genuinely satisfying.
How Your Project Maps to Studio
This trips people up at first, so here's the mapping:
my-roblox-game/
├── default.project.json ← Rojo config
├── src/
│ ├── server/ → ServerScriptService
│ ├── client/ → StarterPlayerScripts
│ ├── shared/ → ReplicatedStorage
│ └── gui/ → StarterGui
And the file naming convention matters:
| File Name | Becomes in Studio |
|---|---|
| CoinSystem.server.luau | Server Script |
| SprintUI.client.luau | Local Script |
| Utils.luau | ModuleScript |
| init.luau | The folder's script |
Get the suffix wrong and your code ends up in the wrong place. Or doesn't run at all. If something isn't working, check the file name first — it's the suffix issue more often than you'd think.
Making Cursor Actually Good at Roblox
Here's a secret most tutorials skip: Cursor's AI doesn't know Roblox. It knows Python, JavaScript, TypeScript — the popular stuff. Ask it to write a Roblox script and you'll get something that uses require("module") instead of require(game.ReplicatedStorage.module). Close, but won't compile.
The fix is a .cursorrules file in your project root. Cursor reads it automatically and uses it as context for every AI interaction:
You are an expert Roblox developer writing Luau code.
This is a Rojo project. Files sync to Roblox Studio in real time.
Rules:
- Language is Luau, not Lua 5.1, not JavaScript
- Use task.wait() not wait(), task.spawn() not coroutine.wrap()
- Require modules via game paths: require(game.ReplicatedStorage.Modules.MyModule)
- Set Parent last when using Instance.new()
- Server code goes in src/server/ (*.server.luau)
- Client code goes in src/client/ (*.client.luau)
- Shared modules go in src/shared/ (*.luau)
- Use RemoteEvents for client-server communication
- Never trust the client — always validate on the server
- Use DataStoreService with pcall for data persistence
The difference is night and day. Without this file, Cursor's AI is guessing. With it, the code it generates is usually correct on the first try — or at least close enough that a quick fix gets it running.
Frequently Asked Questions
Will Roblox ban me for using Cursor?
No. Rojo uses Roblox's official Plugin API. Thousands of professional developers and studios use this exact workflow for production games. It's the standard for any team that wants version control, code review, or — now — AI-assisted development.
Do I need to keep the terminal open the whole time?
Yes. The rojo serve command runs a local server that watches your files. Close it and Studio stops receiving updates. I keep it in a split terminal in Cursor — one pane for Rojo, one for git commands.
Can I still use Roblox Studio's script editor?
You can, but it's a one-way street. Changes in Cursor sync to Studio. Changes in Studio don't sync back to your files. If you edit a script in Studio, your next Cursor save overwrites it. Use Cursor for all code changes and Studio for the visual stuff — placing parts, designing UIs, testing in Play mode.
Does this work with Team Create?
It does, but be careful. Two people editing the same script — one in Cursor, one in Studio — will create conflicts. Pick one editor per script. Most teams assign all scripting to Cursor and use Studio exclusively for world building.
What about performance? Does Rojo slow down Studio?
Not noticeably. Rojo is watching for file changes and pushing them through a local HTTP connection. The overhead is negligible. I've used it on a mid-tier laptop running a 200,000-part game without any issues.
What to Try First
Once everything's connected, open Cursor's AI chat (Cmd+L or Ctrl+L) and try:
- "Create a leaderboard system that tracks player kills and deaths"
- "Build a DataStore module that saves player inventory with auto-save every 60 seconds"
- "Make a shop GUI with buy buttons that use RemoteEvents to validate purchases on the server"
The AI reads your project structure, knows the .cursorrules context, and writes Luau code that syncs straight to Studio. You test it, find issues, tell the AI to fix them. Iterate until it works.
It's a very different way to build Roblox games. And once you try it, going back to Studio's built-in editor feels like going back to dial-up.
Don't want to deal with installing Aftman, Rojo, configuring plugins, and creating rules files? Roxlit handles the entire setup in one command — just run npx roxlit setup and start building.