roblox-npc-ai
БесплатноБез исполняемых скриптовНе проверенUse when building, fixing or reviewing Roblox NPCs, bots or enemies: PathfindingService, Humanoid movement, ownership, many-NPC cost.
от 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,
MoveToFinishedreturnsfalse->Humanoid:MoveTotimes out after 8 s. Keep legs short (waypoints) or callMoveToagain on an interval to reset the timer. It also ends on ~1 stud arrival, a newWalkToPoint/WalkToPart, aHumanoid:Move()call, or a script setting the root'sCFrame, 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:
AgentRadius2,AgentHeight5,AgentCanJumptrue,AgentCanClimbfalse,WaypointSpacing4. Gaps lower thanAgentHeightare unwalkable; a goal reachable only by jumping fails withAgentCanJump = 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.Blockedalso fires for waypoints behind the agent. Recompute only whenblockedWaypointIdx >= nextWaypointIndex, with a bounded retry; never call the follow function recursively fromBlocked.Path.Unblockedexists for the reverse. - Path wades through water or lava -> default search is shortest (it only tries to avoid jumps).
Costskeys areEnum.Materialnames as strings orPathfindingModifier.Labels;math.huge= impassable, a high finite cost (100, 1,000) = last resort. - Region cost or
PassThroughdoor has no effect -> the modifier's part must beAnchoredwithCanCollide = falseand itsLabelmust match aCostskey.PassThroughmakes the path go through the door; the NPC still has to open it. - Boat, zipline or teleporter never used ->
PathfindingLink(Attachment0->Attachment1,Label) needs aCostsentry for itsLabelcheaper than the alternative (UseBoat = 2vsWater = 20), and your follower must act on the waypoint'sLabel(custom action) instead of walking it. Climb waypoints carryLabel == "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 = Atomicfor client visuals; client pathfinding sees only streamed-in geometry, so target parts inPersistentmodels afterWorkspace.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 = falsewhere 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:BulkMoveToplus 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic