Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

roblox-npc-ai

БесплатноБез исполняемых скриптовНе проверен

Use when building, fixing or reviewing Roblox NPCs, bots or enemies: PathfindingService, Humanoid movement, ownership, many-NPC cost.

TabooHarmonyот TabooHarmony★ 230 звёзд на GitHub

Об этом скилле

Roblox NPC & AI

When to Load

NPC, enemy or bot movement and upkeep: pathfinding, Humanoid walking, ownership, streaming, server cost of many NPCs. Physics ownership in depth: roblox-physics §3; profiling: roblox-performance; corpses and ragdolls: roblox-physics §2.

"Field case" = seen in one of the owner's projects; verify on your content.

Traps and review checklist (symptom -> cause -> fix)

  • NPC stops partway on a long leg, MoveToFinished returns false -> Humanoid:MoveTo times out after 8 s. Keep legs short (waypoints) or call MoveTo again on an interval to reset the timer. It also ends on ~1 stud arrival, a new WalkToPoint/WalkToPart, a Humanoid:Move() call, or a script setting the root's CFrame, so a teleport or knockback cancels the walk.
  • Path fails or hugs walls for a big or small NPC -> agent defaults are for a standard character: AgentRadius 2, AgentHeight 5, AgentCanJump true, AgentCanClimb false, WaypointSpacing 4. Gaps lower than AgentHeight are unwalkable; a goal reachable only by jumping fails with AgentCanJump = false. Size per NPC type.
  • Path to a far target fails though one exists -> start-to-finish straight-line distance over 3,000 studs fails, and a search can exhaust its 20,000-node budget well before that in open worlds or mazes. Waypoints with bottom Y outside ±65,536 are ignored. Route through intermediate goals.
  • NPC re-paths constantly while fleeing -> Path.Blocked also fires for waypoints behind the agent. Recompute only when blockedWaypointIdx >= nextWaypointIndex, with a bounded retry; never call the follow function recursively from Blocked. Path.Unblocked exists for the reverse.
  • Path wades through water or lava -> default search is shortest (it only tries to avoid jumps). Costs keys are Enum.Material names as strings or PathfindingModifier.Labels; math.huge = impassable, a high finite cost (100, 1,000) = last resort.
  • Region cost or PassThrough door has no effect -> the modifier's part must be Anchored with CanCollide = false and its Label must match a Costs key. PassThrough makes the path go through the door; the NPC still has to open it.
  • Boat, zipline or teleporter never used -> PathfindingLink (Attachment0 -> Attachment1, Label) needs a Costs entry for its Label cheaper than the alternative (UseBoat = 2 vs Water = 20), and your follower must act on the waypoint's Label (custom action) instead of walking it. Climb waypoints carry Label == "Climb".
  • Client script can't find the NPC or its parts arrive piecemeal -> under streaming, server NPCs exist on a client only near its focus. Set NPC models ModelStreamingMode = Atomic for client visuals; client pathfinding sees only streamed-in geometry, so target parts in Persistent models after Workspace.PersistentLoaded, and expect streaming to block or unblock paths mid-walk. Server pathfinding sees the whole world.
  • Path cost spikes when doors or platforms move -> moving collidable geometry makes the navigation mesh rebuild. Keep moving blockers CanCollide = false where gameplay allows, and capture a MicroProfiler trace before blaming the AI loop.
  • Bot reads as "a bot" -> slow walk speed: 8.5 studs/s was obvious, 11 felt right (field case). Tune reaction delay, aim error and cooldowns instead, with the players' movement numbers.
  • Server lags with many NPCs -> every live NPC is a server-simulated, replicated Humanoid. Think less often, stagger work, and for crowds keep NPCs virtual (§1); measure at the target count.

Limits

Item Value
Path request <= 3,000 studs straight line; 20,000-node budget; waypoints within Y ±65,536
10 active ragdoll NPCs + corpses, one client owner 0.25 ms physics + 0.6 ms heartbeat per frame (field-measured)
40 virtual NPCs drawn as client anchored rigs ~0.2 ms client script per frame (field-measured)
Think-rate start point 0.1 s within ~90 studs, 1 s past ~220 studs; reaction delay 0.15-0.28 s; then profile (field)

1. Many NPCs

  • Virtual server, client rigs: keep position, state and decisions as data on the server (replicated about 20 Hz), and draw each NPC on clients as an anchored rig moved with workspace:BulkMoveTo plus default animations. Switch to shared server physics only for bodies and severed pieces; damage stays server-authoritative, gore client-only, collision groups let players walk through piles (field case).
  • Sense / think / act: stagger each bot's raycasts on its own phase; keep decisions in a pure function with no Roblox calls so Lune tests and seeded headless runs can check it; act with player movement numbers.
  • Measure progress, not state labels: log bots that wanted to move 5 of 10 s but moved under 3 studs (with seed and position). Give fixed objectives a no-progress timeout and temporary rejection; moving chase targets need their own replan rule. Claim scarce
Полный SKILL.md на GitHub

Установить roblox-npc-ai в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл roblox-npc-ai?

Use when building, fixing or reviewing Roblox NPCs, bots or enemies: PathfindingService, Humanoid movement, ownership, many-NPC cost.

Как установить скилл roblox-npc-ai?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл roblox-npc-ai запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить roblox-npc-ai с