CognitoCoding All posts
3 July 2026 3 min read by Eris Taylor

What Happens When You Build a Roblox Game With Only AI Prompts (16 Phases, One Rule: No Hand-Written Luau)

vibe-codingrobloxaigame-devlearning-to-code

The Rule

One rule. No hand-written code. Every line of Luau — the scripting language Roblox games run on — had to come from an AI prompt.

That was the challenge Zero set himself for this build. Sixteen phases, start to finish, with an AI writing the code at every step.

Here's what actually happened.


Phases 1–4: Surprisingly Smooth

Setting up the world — terrain, spawn points, basic movement — went well. The AI understood the pattern: describe a flat map with a spawn point in the centre, and you get a flat map with a spawn point in the centre.

The prompts were clean. The outputs were clean. Zero started to wonder if this was going to be too easy.

It wasn't.


Phase 6: The First Real Failure

The game needed enemies that moved. The AI wrote something that worked in isolation — a script that moved a model from point A to point B — but fell apart the moment two enemies were on screen at the same time.

They collided. They froze. The movement logic had no awareness of other objects sharing the same space.

This is where vibe coding gets interesting. Zero could have:

  • Fixed the script by hand (breaks the rule)
  • Accepted broken enemies (defeats the purpose)
  • Written a better prompt

He wrote a better prompt. And here's the thing: writing a better prompt required understanding why the code failed. Which meant understanding pathfinding — how a moving object finds its way around other objects. Which is exactly the kind of learning the rule was designed to force.


What "Correcting the Miss" Actually Teaches

Every time the AI produced code that didn't work, Zero had to diagnose what was wrong before he could prompt his way out of it.

That's not a shortcut. That's debugging with an extra step.

Vibe coding — using AI to write code from plain-language descriptions — doesn't remove the thinking. It puts the thinking in a different place. Instead of asking "how do I write this", you're asking "why is this doing the wrong thing" and "how do I describe the right behaviour precisely enough for the AI to get it?"

Both require understanding. The second one, arguably, requires more.


Phase 14: The One That Almost Broke the Build

Sixteen phases. Phase 14 is where Zero nearly called it.

The game needed a scoreboard that updated in real time as players earned points. The AI's first attempt used one approach. The second used another. The third tried to combine both and created a feedback loop that crashed the game server.

The fix came from understanding how Roblox separates what the server knows from what each player's screen displays — and writing a prompt that named that separation explicitly.

Once Zero described the architecture correctly in the prompt, the AI produced working code on the first try.

That's the pattern: when the AI misses, the path forward is almost always a clearer description. And writing a clearer description forces you to understand the problem well enough to explain it.


Is This a Good Way to Learn?

Yes — with one condition.

If you use AI-generated code as a black box — accept what it gives you, move on — you learn nothing. If the first working version teaches you nothing about why it works, the first broken version will stop you cold.

But if you treat every AI output as a starting point for understanding, vibe coding becomes a fast learning loop. You see working code for real problems. You see it fail in ways that teach you something. You learn to describe problems precisely.

That last skill — describing a problem precisely — transfers directly to writing code by hand. They're the same skill, approached from different directions.


Watch the Full Build

All 16 phases, documented. Zero walks through the rule, the failures, and the fixes — no polish, no skipping the difficult parts.

Watch on YouTube →