Prompt · NPCs · Updated November 2026
NPC enemies with pathfinding and spawners
Server-simulated enemies that patrol, chase with PathfindingService, attack with cooldowns, drop coins and respawn from spawner parts.
The prompt
Add enemies to my game: template rigs in ServerStorage.NPCs, Spawner parts with NpcName, Max and Respawn attributes. One server script runs a Heartbeat state machine over all NPCs (Idle, Chase, Attack, Return): network owner set to the server, chase players within 50 studs using PathfindingService recomputed every 0.7 seconds, attack within 4 studs on a cooldown with TakeDamage, return to the spawner otherwise. Health bars as BillboardGuis, loot coins on Died through the economy module, respawn after the Respawn seconds. NPC collision group so limbs do not block players. Playtest, fight one, screenshot.The button opens Forge with this prompt already in the message box. Nothing is sent until you press Send, and the credit price shows first. Forge needs a Windows PC with Roblox Studio and the free Forge Bridge; Mac support is planned.
What Forge builds
- Server-simulated NPCs (SetNetworkOwner nil) so they do not jitter or hand control to a client.
- One state machine loop for every NPC instead of a script per enemy, with a cap around 30 pathfinding NPCs per server.
- Pathfinding with jump waypoints and a recompute interval from Forge's NPC playbook.
- Spawners configured by attributes you can edit in Studio.
- Loot and kill credit on the server, a health bar on the client.
Typical credits
On Sonnet 5.5 this prompt usually runs 150 to 500 credits ($1.50–5.00), more if the playtest catches mistakes that need fixing. One credit is one cent, the price is shown before each message, and credits never expire. Opus 5.5 and Fable 5.2 cost more per message and are worth it for a stubborn bug, not for a first build.
| What you ask for | Typical credits |
|---|---|
| This prompt | 150–500 |
| One build step (a button, a HUD fix, a lighting pass) | 20–150 credits ($0.20–1.50) |
| One game system (a shop, saving, a round loop) | 100–600 credits ($1–6) |
| A complete game, following a guide's full sequence | 2,500–6,000 credits ($25–60) |
Full ranges, packs and the optional membership are on the pricing page. New accounts get free trial credits when they first pair the Bridge (Roblox accounts older than 30 days). No card is needed.
How to run it
- Open your place in Roblox Studio and turn on Assistant ▸ ⋯ ▸ Manage MCP Servers ▸ Enable Studio as MCP server.
- Run the Forge Bridge on the same PC and confirm the pairing in the Forge web app; the sidebar shows your place name in green.
- Press Build this in Forge above (or copy the prompt and paste it), read the price, press Send.
- Forge reads your place first, builds, playtests, reads the console and sends a screenshot. Reply with changes; it remembers your place between messages.
Questions
Can enemies use my own models?
Yes. Put rigged models in ServerStorage.NPCs; Forge sets PrimaryPart and uses the Animator for animations you own.
Why a collision group?
Without it NPC limbs collide with players and each other, and chases turn into a pile-up.
Related prompts and guides
- Main menu that does not block play: A branded title card that fades after two seconds, with Play, Shop and Settings, a spawn facing the action and no lobby.
- Settings menu with saved toggles: Music, SFX, screen shake, number pops and quality toggles that persist per player and respect reduced motion.
- Daily rewards with a seven-day streak: A daily reward card on a 20-hour server clock with a 48-hour streak window, seven escalating rewards and a HUD badge.
- How to make a Roblox RPG with AI: the full step-by-step sequence this prompt belongs to.
- Pricing: packs from $10, what a whole game costs, membership perks.
- All prompts: every genre and system in the library.