Skip to content

An NPC You Can Talk To

By the end of this page you will have a character standing in your world who players can walk up to and speak with — a dialogue box that types itself out, choices that branch the conversation, and a reward handed out when it ends well.

Time: 30 to 45 minutes.

Cost: about five or six messages. Build messages are charged by how much work each one takes rather than a flat rate, with a minimum of 0.1 credits per message — watch the credits pill in the dashboard header.

You need: Roblox Studio open on a place you can edit, and the Revix plugin connected — the pill at the top of the dashboard should show your game's name with a green dot. If it does not, start with Setup.

What you're building

Three parts working together. A character standing in the world. A prompt that appears when a player gets close and opens a dialogue box when they press the key. And a conversation stored as a list of nodes on the server, where each node has some text and a few choices, and each choice points at the next node.

Modelling the conversation as a node list rather than a chain of if-statements is what makes it possible to add a whole new branch later by adding a few lines instead of rewriting the script.

Done looks like this: you press Play, walk up to the NPC, press E, read a line typing itself out, pick "I'll help", and finish the conversation 100 coins richer.


Step 1 — Place the NPC

text
Place a standing NPC character near the spawn point, facing the spawn so players see the front of it. Give it a name tag floating above its head reading MARLO - VILLAGE ELDER. Anchor it so it cannot be pushed over, and build a small wooden market stall behind it with a couple of crates so it looks like it belongs there rather than standing in an empty field.

What happens. Revix builds the stall from parts and can pull a character model or props out of the Revix Toolbox, a curated in-house library of models, kits, audio and effects. It is not a search of the whole Roblox marketplace — when the library has nothing suitable it will say so plainly and build the thing by hand instead.

That library is a switch you control. Open Chat settings from the left rail and you will see Toolbox access, described as letting Revix add pre-made assets from the Revix Toolbox to your game. It is on by default; with it off, Revix builds everything from scratch.

Check it worked. Press Play. The NPC should be standing upright facing you, with the name tag readable from a few studs away.

Step 2 — Add the prompt

text
Add a proximity prompt on the NPC so players can interact with it. The prompt shows when a player is within 10 studs, reads TALK with an action name of MARLO, and needs a short hold rather than a single tap so it does not fire by accident while running past. Nothing should happen yet when it is triggered except a line printed to the output window.

What happens. The prompt and its handler get built. Building the prompt on its own first is worth the extra message: if the conversation later does not open, you already know whether the problem is the prompt or the dialogue.

Check it worked. Press Play, walk up to the NPC and the TALK prompt should fade in. Hold the key. Then send:

text
Read the output window and tell me whether the prompt fired.

Step 3 — Build the dialogue box

text
Build a dialogue screen for talking to NPCs. A wide panel across the bottom third of the screen: the speaker name in an accent colour on the left of a title bar, the line of dialogue in the body, and up to four choice buttons stacked underneath. Type the dialogue out one character at a time, and let a click skip straight to the full line instead of forcing players to wait. Add a subtle open and close animation. Keep the panel readable on a phone as well as a desktop.

What happens. The screen goes into StarterGui together with the script that drives it. On-demand screens like this one are built switched off, so it cannot flash on players when they spawn — you will not see it in the viewport until it opens in a playtest.

One thing to expect: Revix builds interfaces from shapes, colour and text, not from icon art, and it will not put emoji or decorative symbols into Roblox text because the fonts render them as empty boxes. If you want a portrait or an icon on the panel, generate one separately — see Generating Images.

Check it worked. Press Play. You should see nothing. That is correct — nothing opens it yet.

Step 4 — Write the conversation

text
Wire the TALK prompt on Marlo to open the dialogue screen with a branching conversation. Keep the conversation as a node table on the server, where each node has text and a list of choices, and each choice points at the next node or closes the conversation.

Node 1: "The mine has been quiet three days now. Too quiet." Choices: "What happened?" and "Not my problem."
Node 2 (What happened): "Something moved in. I need someone brave enough to look." Choices: "I'll help" and "Maybe later."
Node 3 (I'll help): "Then take this, and be careful." Closes the conversation.
"Not my problem" and "Maybe later" both close it with a short parting line.

The client only shows the current node and sends back which choice was picked. The server decides what happens next.

What happens. Keeping the node table on the server is the point of that last sentence — if choices are ever going to hand out rewards, a player must not be able to tell the game they reached the reward node.

Check it worked. Press Play, hold the prompt, and click through both branches. Picking "Not my problem" should close it in one step; picking "What happened?" then "I'll help" should take three.

Step 5 — Add the reward

text
When a player reaches the "I'll help" node, give them 100 coins as a leaderstat and show a short toast in the corner reading QUEST ACCEPTED - 100 COINS. Record on the server that this player has already accepted, so talking to Marlo again plays a different short line and never pays out twice. Save that flag so it survives a rejoin.

What happens. The payout and the already-accepted flag both live on the server, and anything that grants currency is rate-limited per player automatically.

Check it worked. Press Play, take the quest, watch coins go to 100. Talk to Marlo again — you should get the follow-up line, not the offer, and coins should stay at 100. Stop, press Play again, talk once more: still the follow-up line.

Step 6 — Sweep and check

text
Check the NPC, the stall and the dialogue screen for problems, fix everything you find, and then tell me plainly which parts of this conversation you could not verify without a playtest.

What happens. Revix scans the build for things like unanchored parts, zero-size elements and elements sitting off screen, and re-reads the dialogue script against the screen it built to confirm every element it refers to actually exists. What it cannot do is run the conversation — anything that only happens for a live player gets listed as unverified rather than claimed as tested.


Make it yours

text
Make Marlo turn to face whichever player is talking to him, keeping him upright rather than tipping back.
text
Give Marlo an idle animation so he is not standing perfectly still while talking.
text
Add a second NPC by the mine entrance who only has dialogue after Marlo's quest is accepted, and who completes the quest for 500 coins.
text
Turn Marlo into a shopkeeper: the prompt opens a stock list of three items, and buying is checked and paid out on the server.
text
Make Marlo walk a patrol route between four points around the market and stop walking while a player is talking to him.

If something goes wrong

The prompt never appears.

text
The TALK prompt on Marlo does not show up when I walk over. Check where the prompt is parented, its distance setting and whether it is enabled, and fix it.

The dialogue box never opens.

text
Holding the TALK prompt does nothing. Read the dialogue screen script against the actual screen tree, find where the reference or the connection is wrong, and fix only that.

The panel is stuck on screen and blocks the game.

text
The dialogue panel stays open and I cannot move. Make the screen start switched off, close it on the final node and when the player walks more than 15 studs away, and make sure nothing invisible is left covering the screen.

The reward pays out over and over.

text
I can talk to Marlo repeatedly and get 100 coins every time. Record on the server that the player already accepted, check that flag before paying, and add a test that proves a second attempt pays nothing.

The animation you asked for does not move anything. An animation Revix makes is saved onto the rig rather than played in the viewport, because playing one in edit mode leaves the model bent out of shape. Select the rig in Explorer, open the Animation Editor from the Avatar tab, and pick the clip by name to scrub and play it. See Generating Animations.

The build stopped before it finished. A card reading "That one stopped early" appears with a Keep going button. Press it, or type continue. Nothing already built is undone.

Next