AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Roblox Npc Ai

skill-tabooharmony-roblox-brain-roblox-npc-ai · by TabooHarmony

Pathfinding, state machines, NPC detection (LOS/FOV), spawn systems, enemy AI patterns.

No reviews yet
0 installs
6 views
0.0% view→install

Install

$ agentstack add skill-tabooharmony-roblox-brain-roblox-npc-ai

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-tabooharmony-roblox-brain-roblox-npc-ai)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Roblox Npc Ai? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Roblox NPC & AI

Use this skill when creating NPCs, enemies, bosses, or autonomous characters that navigate, detect players, or make decisions.

Quick Reference

PathfindingService

local path = PathfindingService:CreatePath({
    AgentRadius = 2, AgentHeight = 5, AgentCanJump = true,
    Costs = { Water = 20, DangerZone = math.huge },
})
path:ComputeAsync(npcPos, targetPos)
if path.Status ~= Enum.PathStatus.Success then return end
for _, wp in path:GetWaypoints() do
    if wp.Action == Enum.PathWaypointAction.Jump then humanoid.Jump = true end
    humanoid:MoveTo(wp.Position)
    if not humanoid.MoveToFinished:Wait() then return end
end
  • Connect path.Blocked to recompute when world changes
  • Region modifiers: Anchored part + PathfindingModifier with Label → Costs
  • PassThrough = true for doors; PathfindingLink for disconnected navmesh
  • math.huge cost = non-traversable

State Machine

idle → patrol → chase → attack → flee → dead

  • idle/patrol → chase (player detected) → attack (in range) → idle (lost)
  • any → flee (health low) → idle (safe); any → dead (health ≤ 0)
  • Transition func handles walk speed changes, clears target on idle

Detection (distance → FOV → LOS)

  1. Distance (a-b).Magnitude — cheapest, always first
  2. FOV forward:Dot(toTarget) cosine — ~120° cone
  3. LOS workspace:Raycast — expensive, last
  • Skip dead players. Close-range (~30%) bypasses FOV (hearing)

Spawners

  • Track active enemies, cap count, remove on Humanoid.Died
  • Clone → PivotTo → parent; task.delay(3, Destroy) for death anim
  • Wave: {enemies={{template, count}}, spawnDelay, waveDelay}

Network Ownership — MUST DO

for _, part in model:GetDescendants() do
    if part:IsA("BasePart") then part:SetNetworkOwner(nil) end
end

Without this, exploiters fling NPCs. Server = safe but 30Hz tick.

Update Loop

  • Throttle AI to 5-10 ticks/sec, NOT every Heartbeat
  • Stagger large batches (5/frame); ALL NPC logic server-side only

Pitfalls

  • No path.Blocked handler → stale paths
  • No ComputeAsync fallback → frozen NPCs
  • MoveTo 8-sec timeout; handle reached = false
  • Forget SetNetworkOwner(nil) → exploiters fling NPCs
  • Dead corpses not destroyed → memory leak
  • 50 NPCs pathfinding same frame → server lag spike

Need more detail? Load references/full.md for the complete reference with code examples, API tables, and edge cases.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.