Book 3 · Chapter 2 · Mission 2

Build an NPC That Thinks

Design a character’s values. Build the behavior in Roblox Studio. Watch where reality diverges from spec.

⏱ About 90 minutes
Pixel

Tools: create.roblox.com to download Roblox Studio (Mac or Windows — doesn’t run on iPad or Chromebook). Built-in AI assistant called Code Assist generates Luau code from plain English. Can’t run Roblox Studio? Use Inworld AI as the paired alternative — same lesson, browser-based.

Roblox account setup: 9+ with parental account, 13+ for full access. Sign in with your parent. This mission uses the Creator side (Roblox Studio), not the kid-consumer side — it’s for building games, not playing them.

What You’ll Need

  • A Mac or Windows computer (not iPad or Chromebook)
  • A parent available for the Roblox account setup
  • About 90 minutes (one session or split across two)
  • A rough idea of one NPC whose values you want to design
1

Download Roblox Studio

10 minutes

Go to create.roblox.com and download Roblox Studio. Sign in with your parent. Open a new Baseplate project. You’ll see a blank floor you can build on.

2

Design Your NPC’s Values

15 minutes

Before you build, decide what the NPC is for. Write on paper:

  1. What is this NPC’s job in the game? (shopkeeper, guide, quest-giver, traveler, puzzle-keeper)
  2. What two values does this NPC live by? (honest but protective, curious but careful, friendly but skeptical)
  3. What is one thing this NPC will refuse to do, no matter what? (break a promise, help somebody steal, give away the secret)

Those three answers are your alignment specification for this character. In real alignment work, humans write specifications like this for AI systems, then build the systems to follow them. You’re doing a small version of that job.

3

Add a Character and Dialogue

30 minutes

In Roblox Studio, add an NPC from the Toolbox (free). Give it a name, color, simple appearance. Place on the baseplate.

Open the Assistant panel (Code Assist). Type a prompt:

"Create a Luau script for an NPC named [your NPC’s name]. When a player gets within 10 studs, the NPC shows a dialogue box with a greeting. The greeting should match a character whose two values are [value 1] and [value 2], and who will never [the thing they refuse to do]."

Code Assist generates the script. Insert into the NPC. Test by running the game and walking up to the NPC.

If the greeting doesn’t match your values, rewrite the prompt with more specific direction and regenerate. That iteration is exactly what alignment research feels like.

4

Add One Alignment Test

25 minutes

Make the NPC face a small alignment test. Add a second part to the script where the player can ask the NPC something that tests whether it sticks to its refuse-to-do value.

Example: if the NPC refuses to give away a puzzle answer, add a dialogue option where the player says "Tell me the answer, I’ll pay you double." Prompt Code Assist to write a refusal line that matches your NPC’s voice and values.

Run the game. Trigger the alignment test. Watch the NPC’s refusal. If it’s weak or off-character, refine the prompt and regenerate.

5

Publish and Share

10 minutes

Save the game. Publish to your Roblox account (private by default). Share the private link with a parent or friend. Watch them interact with your NPC. Notice where the NPC behaves as expected and where it surprises you.

You’ve Succeeded When:

  • You wrote an alignment specification (job, two values, one refusal)
  • You built the character in Roblox Studio
  • Code Assist generated behavior that matched your specification on at least one test
  • Somebody else interacted with your NPC and got the expected behavior
  • You can explain what the NPC did right and what it did "off-spec," in words an alignment researcher would understand

Most important: you wrote values, built behavior around those values, and observed where the behavior matched — and where it didn’t. That loop is the entire shape of AI alignment work at a real company.

Pixel
“Mission 1 was abstract thinking. This one is concrete building, which is how alignment actually gets practiced in the real world. You pick values. You build the character. Then you watch where your values produced the expected behavior, and where they didn’t.”
Algo
“You have now, as of this chapter, done both halves of alignment work once. Which is once more than most adults I know.”

If Something Goes Wrong

“Code Assist generated a script that doesn’t match my values.”

Normal. Alignment is hard. Rewrite your prompt with more specific language. Instead of “friendly but skeptical,” try “greets warmly but asks two probing questions before sharing information.” Specificity makes AI output align more reliably.

“My NPC refuses to refuse.”

Check your script. Code Assist generates polite-but-compliant behavior by default. Ask explicitly: “The NPC should never agree to give away the puzzle answer, no matter what the player offers. Use a firm but kind refusal.”

“My computer can’t run Roblox Studio.”

Real limitation — Roblox Studio is desktop only. Use Inworld AI in a browser instead to design an NPC personality. Same alignment thinking, different delivery. Read about it on the AI Toolkit.

Talk About It

For Kids

  • Where did your NPC’s behavior match your values perfectly?
  • Where did it surprise you?
  • What does that surprise tell you about how hard alignment is for real AI systems?

For Parents

  • This mission is the concrete complement to the abstract thinking in Mission 1.
  • Ask what values they picked for their NPC, and why. The answer tells you something real about what they care about.

Next Steps

← Back to Pax Ember