Skip to content

Debug a Script That's Broken

By the end of this page you will know how to hand Revix a real error, get a fix that changes only the broken lines, and prove the fix actually worked instead of hoping.

Time: 5 to 20 minutes for most bugs.

Cost: charged like any other message — by how much work it takes, minimum 0.1 credits.

You need: Studio open with the plugin connected, and a bug you can reproduce.

Worth knowing up front: Revix cannot press Play, and it cannot see your screen. Everything below is built around those two facts.

What you're building

A repeatable habit: reproduce, hand over the evidence, get a targeted fix, confirm it. It is the same loop whether the bug is a red error in Output or a "the button just doesn't do anything".


Step 1 — Press Stop first

If a playtest is running, stop it. Script edits do not take effect in a session that is already running, so fixing while you are still playing produces the very confusing result of a fix that changes nothing.

Revix can tell whether Studio is in edit mode or mid-playtest, and it will warn you — but you will save a round trip by stopping first.

Step 2 — Hand over the error

Copy the error line from the Output window. You want the message, the script path and the line number.

text
I'm getting this when a player touches the shop pad:
ServerScriptService.ShopHandler:42: attempt to index nil with 'Coins'
Find it, tell me the actual cause, and fix it.

A practical note: the composer caps a message at 200 words, so do not paste an entire log. One error line is enough — and if you would rather not copy anything at all, skip to step 3 and let Revix read the console itself.

What happens. Revix searches every script in your place for the error text or the function name, opens the relevant file — it can read a whole script, a range of lines, an outline of its functions, or one named function without loading the rest — and works out what is wrong before it changes anything.

Then it reports back in a fixed shape: what the issue was, the cause, where it lives, what kind of script it is, what it changed, and how it proved the change.

Check it worked. Read the cause sentence. If it does not describe your bug, say so now rather than accepting the fix.

Step 3 — Or let it read the console for you

text
Read the Studio output window and tell me what is failing. Show me the errors and warnings, not the prints.

Revix reads the recent Output window — up to 500 lines, tagged as errors, warnings, info and prints — and it reads what your running game logged, not just its own work. Run the game, hit the bug, stop, then ask.

Step 4 — Ask it to read the surrounding code

Sometimes the error line is only where the problem surfaced. Point Revix at the real area.

text
Read the whole PurchaseItem function in ServerScriptService.ShopHandler and explain, step by step, what happens when a player with 0 coins clicks Buy.

You can also aim it precisely by typing @ in the composer and browsing to the exact script or folder — the menu indexes your whole connected game, not just scripts.

Step 5 — Confirm the fix

There are two ways, and you want the strongest one available.

Ask for a real test. For server-side logic, Revix can write a test and actually run it, then report ✓ ALL PASSED or ✗ FAILURES with each failure named. It is not allowed to claim a pass without running something.

text
Write and run a test that checks buying an item with too few coins is rejected, and that buying with enough coins deducts exactly the price once.

Press Play yourself. For anything that only exists for a player — a button, the camera, movement, a screen, a respawn — there is no substitute. Revix will ask you directly, with a message that starts ACTION NEEDED — press the Play ▶ button in the Studio toolbar, and then wait for you.

text
I pressed Play. The shop opens now but the Buy button still does nothing when I click it. Read the output window and keep going.

Step 6 — When the first fix does not work

This happens. What separates a two-message fix from a ten-message one is the quality of what you send back.

Give it three things: what you did, what you expected, what actually happened.

text
Still broken. I clicked Buy with 500 coins. I expected coins to drop to 400 and the sword to appear in my backpack. Nothing happened and there is no new error in Output.

If it is still going in circles, change the angle:

text
Nothing is printing at all, so I don't think the server is even receiving the click. Check both sides — the LocalScript that fires the buy request and the server script that listens for it — and tell me which side is silent.

That last one matters more than it looks. A lot of "nothing happens" bugs are a message being sent from one side that nothing is listening for on the other.

Step 7 — Undo if a fix made things worse

Ctrl+Z in Studio walks back Revix's changes like any other edit, one change at a time. Or just say it.

text
Undo the last change.

Revix can step Studio back up to 20 changes on request. Nothing it does is saved or published anywhere you cannot reverse — the work lands in your open place and you choose when to save.


What Revix genuinely cannot see

Being clear about this saves you asking twice.

  • Anything that only exists while the game is running — the player object, their screen, the local player. From edit mode those do not exist, and Revix will say so rather than pretending.
  • Your viewport. No screenshots, ever. It checks its work by measuring and by reading code back, never by looking.
  • Whether client code actually runs. A LocalScript that fails on its first line looks identical to a working one from edit mode. Revix is required to tell you which parts it could not verify — that is the "Heads up" section at the end of its summary. Read it.

Make it yours

text
My game gets laggy after about five minutes. Search for anything running every frame that probably shouldn't, and tell me what you find before changing anything.
text
Find every place in my scripts where a remote can be fired by a player without the server checking anything, and list them.
text
Explain what ServerScriptService.DataHandler does, in plain English, in five bullet points.

If something goes wrong

The fix broke something else. Say exactly what, and ask for the minimum change. Revix is already instructed not to rewrite working code while fixing a bug — hold it to that.

text
That fix changed how the inventory sorts as well. Put the sorting back exactly how it was and only keep the coin deduction change.

It keeps fixing the wrong file. Point at the file with @ and say so.

Nothing appears in Output. The error may be on the client. Press Play, reproduce the bug while the game is running, stop, then ask Revix to read the console.

The turn ran out before it finished. Type continue. Everything already changed stays.

Next