← All guides

How to Make a Roblox Game with AI (Step by Step)

Build a small Roblox game with AI: plan it, generate and optimize the assets, script it in Luau with an AI that knows your project, then playtest and publish.

8 min read

AI will not make a Roblox game for you. It will make the parts of one, fast, and that changes what a single person can ship in an afternoon. This guide walks through building a small game end to end: an obby with checkpoints, a coin shop, and ten custom props. Every step is you deciding and the AI producing.

You need Roblox Studio (free) and an AI tool that can talk to it. The examples use HyperDevs, which is free to start, but the workflow is the same with any assistant wired to Studio through MCP.

What AI is good at, and what it isn’t

Worth being clear about before you start:

  • Good: props and textures from a description, Luau boilerplate (leaderstats, checkpoints, shops, data stores), refactoring, explaining an error in the Output window.
  • Bad: deciding what the game is, making it fun, balancing it, and knowing anything about your project unless you give it that context.
  • Dangerous: code you apply without reading. It compiles, it runs, and three prompts later it contradicts itself.

The rest of this guide is built around those three facts.

Step 1: Decide the game and write a one-page brief

Pick something with a known shape. An obby is the classic first project because every mechanic in it is small and testable. Then write a brief. Ten minutes, plain text:

Goal: reach the end of the course. Checkpoints save progress. Mechanics: checkpoints, kill bricks, a coin shop that sells a speed boost. Art style: low-poly, flat-shaded, bright colours, single objects on plain backgrounds. Assets (10): start gate, checkpoint flag, lava tile, crumbling platform, spinning bar, coin, treasure chest for the shop, and three decorative props (mushroom, crystal, signpost).

Every prompt you write from here on starts from this brief. Consistency in an AI-built game comes from the brief, not from the model.

Step 2: Set up Studio and connect the AI

  1. Open Roblox Studio and create a new Baseplate.
  2. If you want one-click mesh import, turn on the EditableMesh beta feature under File → Beta Features. Without it you can still import meshes the traditional way (see how to make 3D models for Roblox).
  3. Install HyperDevs, accept the Terms, and take the short tour or skip it. Sign in, and the built-in Hyper 30 model is ready with no API key. You can also plug in your own Gemini, Claude, OpenAI, z.ai, or Ollama key.
  4. Open the Game tab and connect to Studio. The Studio plugin installs itself. The Getting Started doc has screenshots of each step.

If you’re using a different assistant, you’ll wire up a Roblox MCP server and plugin by hand. The MCP guide explains what that involves.

Step 3: Generate the assets, then shrink them

Work through the asset list from your brief. For each one, the loop is: image, mesh, optimize, import.

Prompt for a mesh, not a picture. Image-to-3D models want a single object on a clean background. The pattern from our text-to-3D guide holds:

a low-poly treasure chest, single object, plain white background, flat shading, game asset

Pick the model by what the asset is for.

AssetModelWhy
Lava tiles, coins, anything repeated fifty timesTripoSRSeconds per mesh, vertex colours, low detail is fine
Most propsTrellis 2Game-ready topology with baked textures in about 17 seconds
The chest, the gate, anything the player stares atHyper3D Rodin v2Highest detail, about 90 seconds

Optimize every mesh before it touches Studio. AI meshes arrive with tens of thousands of triangles. Roblox caps a single mesh at 20,000, and a prop you place fifty times should be 2,000 to 4,000. The Optimize tab decimates to a target count; the polygon limits guide explains where the numbers come from.

Import. Click Send to Game and the mesh appears in Studio as an EditableMesh. Name it in the Explorer as you go, because you’ll be asking the AI to reference these names in Step 4.

On cost: images are about 1 credit and 3D models 10 to 65 credits depending on the model, at 1 credit per cent. Ten props is a couple of dollars of credits at most, and the free tier covers a chunk of it. The asset pipeline doc covers the full loop.

Step 4: Script the mechanics with the AI, one system at a time

Scan first. Before asking for any code, open the Memory tab and run a Quick Scan. This indexes your Explorer hierarchy so the AI writes workspace.Checkpoints because that folder exists, not because it guessed. The memory system doc explains what gets indexed.

Then prompt for exactly one system. In the Coder tab:

Create a server Script in ServerScriptService called Checkpoints. Each player gets a leaderstats IntValue named Stage. Parts under workspace.Checkpoints are named 1, 2, 3 and so on; touching one sets the player’s Stage to that number if it’s higher than their current stage. When a player respawns, move them to the checkpoint matching their Stage.

Here is the kind of script that prompt should produce. Read it before you apply it:

-- ServerScriptService/Checkpoints
local Players = game:GetService("Players")
local checkpoints = workspace:WaitForChild("Checkpoints")

local function setStage(player: Player, stage: number)
	local leaderstats = player:FindFirstChild("leaderstats")
	local stat = leaderstats and leaderstats:FindFirstChild("Stage")
	if stat and stage > stat.Value then
		stat.Value = stage
	end
end

Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local stage = Instance.new("IntValue")
	stage.Name = "Stage"
	stage.Value = 0
	stage.Parent = leaderstats

	player.CharacterAdded:Connect(function(character)
		local root = character:WaitForChild("HumanoidRootPart")
		local target = checkpoints:FindFirstChild(tostring(stage.Value))
		if target then
			task.wait() -- let the default spawn finish first
			root.CFrame = target.CFrame + Vector3.new(0, 4, 0)
		end
	end)
end)

for _, part in checkpoints:GetChildren() do
	if part:IsA("BasePart") then
		part.Touched:Connect(function(hit)
			local player = Players:GetPlayerFromCharacter(hit.Parent)
			if player then
				setStage(player, tonumber(part.Name) or 0)
			end
		end)
	end
end

Things to check as you read: the script is a server Script, not a LocalScript; it only ever raises the stage, never lowers it; and it waits for HumanoidRootPart before moving the character. If any of that is missing, say so in the next prompt rather than fixing it silently, so the AI’s next system is written the same way.

The Coder tab shows the change as a diff and applies it in one click. Since v0.1.21 you can also edit the script yourself in the same panel and save straight back to Studio.

Repeat for the other two systems, one prompt each:

  • Kill bricks: “Parts tagged KillBrick set the touching player’s Humanoid health to 0.”
  • Shop: “A ProximityPrompt on workspace.Shop.Chest spends 50 coins from leaderstats to set WalkSpeed to 24 for 30 seconds. Use a RemoteEvent only if the client needs to know.”

When something breaks, paste the exact line from the Output window into the prompt. Vague descriptions get vague fixes. Our AI scripting guide has more prompt patterns, and the Luau documentation is the reference to check the AI against.

Step 5: Keep the AI honest as the project grows

Every time you add a folder, rename a part, or add a script, the AI’s picture of your game goes a little stale. Two habits fix that:

  • Rescan after structural changes. A Quick Scan takes seconds. Run a Deep Scan once the project has real scripts in it.
  • Check the Relations view. It shows which scripts fire which events and require which modules, with any link that points at something that no longer exists marked as dangling. If the AI starts inventing names, this is where you’ll see why.

Step 6: Playtest, fix, repeat

Press Play in Studio and actually run the course. Typical first-round bugs in an obby:

  • Touched fires many times per touch. The stage-only-goes-up check above handles it; a coin pickup needs its own guard.
  • The character spawns at the checkpoint and immediately falls through, because the part is thin. Raise the offset or thicken the part.
  • The shop works in Studio but not in a published game because a script relied on the client having authority. Keep purchases on the server.

Fix one thing per prompt, with the error text pasted in. Also test at phone size with Studio’s device emulator, since most Roblox players are on mobile.

Step 7: Publish

File → Publish to Roblox, give it a name and an icon, then set the experience to public in the Creator Dashboard. Roblox’s publishing docs cover the settings. Ship the small version, watch a few people play it, and let what they do decide the next prompt.

Common mistakes

  • Skipping the brief. Without it, every prompt drifts and the game looks like five different games.
  • Importing raw meshes. One 80,000-triangle chest will hurt frame rate more than the rest of the game combined.
  • Asking for the whole game in one prompt. You’ll get a plausible wall of code that nobody, including the AI, can debug.
  • Applying code you didn’t read. The bug you accept today is the contradiction you chase tomorrow.
  • Never rescanning. Stale project memory is the number one cause of “the AI made up a name”.

Frequently asked questions

Can AI make a whole Roblox game by itself? No. It can produce assets and scripts from clear instructions, but the design, the fun, and the decisions about what to build next are yours. Treat it as a very fast junior collaborator.

Do I need to know Luau? Enough to read it. You don’t need to write every line, but you need to recognise a server script from a client script, spot an infinite loop, and understand what a prompt produced before you apply it. The Luau docs and luau.org are the two references worth bookmarking.

Is this free? Roblox Studio is free. HyperDevs is free to start: the built-in Hyper 30 model is credit-billed with a free tier, and bringing your own API key for the chat models costs nothing extra.

Does Roblox allow AI-generated content? Yes. Roblox ships its own AI Assistant and permits AI-assisted creation. Your game still has to follow the Roblox Community Standards, and you’re responsible for what you publish, the same as with hand-made content.

How long does this take? An afternoon for the playable skeleton described here. Making it good takes as long as it always has; the AI just removes the parts that used to take a weekend each.

Try it in HyperDevs

Everything in this guide works in HyperDevs — the AI-powered Roblox development environment.

Download for Windows