Lesson 4
Check what it wrote
Goal: Review AI-written Luau for the common failures.
about 6 min3 practice exercises
AI-written code fails in a few predictable ways. Read every script for these before it goes in your game.
It trusts the client. A remote that accepts an amount, a price or a result from the client is the classic one. The server must look those up itself.
It uses old or invented API. Assistants learned from years of forum posts. Watch for the old global wait instead of task.wait(), the old Humanoid LoadAnimation method instead of the Animator, and method names that do not exist at all. If you do not recognize a method, look it up in Roblox's docs before trusting it.
It skips failure. DataStore and MarketplaceService calls without pcall. A failed load treated as "new player".
It does more than you asked. Extra scripts, an inserted model, a require with a number in it. Anything it brings in from outside gets the same checks as a free model.
Then test, in this order:
- Read it and explain to yourself what each part does.
- Play test and watch Output for errors.
- Try to break it: click fast, send the wrong thing, leave mid-action.
- Test with two players.
If you cannot explain a script, you cannot fix it at 2 a.m. when it breaks with real players in the game. Ask the assistant to explain it line by line until you can.
Go deeper on Rodex
Sources
Checked against Roblox's documentation on . The lesson is in our own words; these pages are the source of truth.