scenario-roblox-gameplay
Use when building Roblox gameplay systems: NPC or enemy AI that patrols, chases and attacks, state machines or behavior trees, 'NPC pathfinding stuck', 100 zombies lag the server, hitboxes, melee combos, M1 combat, 'hits register twice', raycasts, Spherecast, Shapecast, guns and projectiles, 'bullet…
Install / Use
npx skills add scenario-labs/skills --skill scenario-roblox-gameplayInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Project & Program ManagementSupported Platforms
Tags
Our assessment of scenario-roblox-gameplay
scenario-roblox-gameplay scores 86/100 on our quality scale, 38th of 84 Project & Program Management skills we index (top 46%).
Its SKILL.md is 20 KB long, well organised into 10 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 1,048 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 35 days ago, so scenario-roblox-gameplay is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-20. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
scenario-roblox-gameplay compared with similar skills
All 4 of these similar skills score higher than scenario-roblox-gameplay; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| scenario-roblox-gameplay (this skill)by scenario-labs | 86 | 1.0k | 35d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| prospectingby coreyhaines31 | 100 | 60.1k | 11d ago | SKILL.md |
| ad-creativeby coreyhaines31 | 100 | 60.1k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install scenario-roblox-gameplay?
- Run
npx skills add scenario-labs/skills --skill scenario-roblox-gameplay. The install tabs above show the steps for each supported agent. - Which AI agents does scenario-roblox-gameplay work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is scenario-roblox-gameplay safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is scenario-roblox-gameplay still maintained?
- The repository was last updated 35 days ago, so scenario-roblox-gameplay is actively maintained.
Skill content
View source on GitHubname: scenario-roblox-gameplay description: "Use when building Roblox gameplay systems: NPC or enemy AI that patrols, chases and attacks, state machines or behavior trees, 'NPC pathfinding stuck', 100 zombies lag the server, hitboxes, melee combos, M1 combat, 'hits register twice', raycasts, Spherecast, Shapecast, guns and projectiles, 'bullets go through walls', knockback and stun, LinearVelocity, VectorForce or AlignPosition movers, replacing BodyVelocity, cars and vehicles with suspension, 'car flips', VehicleSeat, network ownership of NPCs and vehicles, round loops, BindToSimulation logic." license: MIT
Roblox gameplay systems (gameplay systems programmer)
Target line: Roblox Studio (October 2026 build) on macOS, driven through the scenario-roblox-expert toolkit.
At expert level, a gameplay system is a pure rule tested in Lune, wired to the engine by one server
scheduler, and proven in a playtest with measured server cost. The core stance: the client sends
intent, the server decides every hit with a spatial query, and no number ships unmeasured. If a
sibling skill named here is missing from your available skills, load it with skill_get (Scenario
MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install); unattended,
proceed from tool schemas and flag the gap.
REQUIRED BACKGROUND: scenario-roblox-expert (channels, review loop, toolkit, current-Roblox traps).
Status (2026-10-19): 23 live tests pass in Studio 0.743 (Edit probes, NPC bench, hunt, debug drawings, combo, remote flood, car and its exit with the throttle held, movers, every doc snippet in the playtest Server); 6 offline checks pass (23 Lune specs, luau-lsp on both type solvers over 15 kit files and 12 snippets). Not yet run: two-player combat (each test client opens a Studio window), a touch device, a route through a pathfinding modifier and link.
Stance (the expert delta)
- Intent up, hits decided on the server. The client fires
Attackwith no arguments; the server picks the combo step from its own clock and queries a box in front of the root. Spatial queries replaceTouched(Ludius, gmz904QpfxU 00:01:15): a client-owned part can fireTouchedon the server anywhere (Network ownership doc). Validation and rate limits: scenario-roblox-networking. - Know what a query skips. Spherecast, Blockcast and Shapecast ignore parts they start inside
(veraktt, GtqFcyFgIXQ 00:19:33). Check the start with an overlap query. A Shapecast's final
position is
origin + direction.Unit * Distance;Positionis the contact point (Crusherfire, EIOwGMZYidw 00:07:12). UseExcludeInstancesorIncludeInstances, neverFilterDescendantsInstances, and build the list per shot (BrawlDev, u6I17z6ggUg 00:28:41). - Sweep, then move; step by dt. Cast the whole step before committing it (veraktt 00:12:22). Trapezoid displacement makes the path independent of frame rate (BrawlDev, 0Dt-Ab8czPw 00:33:08); measured in Lune: 30, 60 and 240 Hz agree within 0.001 studs, Euler drifts 0.5.
- One scheduler for every NPC, measured at the target count. One Heartbeat thinks one bucket
per frame, one worker computes paths on a budget, perception is distance first and one raycast
against static geometry [added]. Measured with 100 R15 NPCs: server 60 fps, frame p95 17.6 ms, AI
0.14 ms per frame patrolling and 0.26 ms chasing; the physics step grew to 1.8 ms. Humanoid
physics costs more than the brain, so measure at your count with the AgentKit
Stats, and cut the per-Humanoid cost: unused states disabled,BreakJointsOnDeathfalse, no state machine on static NPCs, models pooled across waves (P5). - Pin NPC roots to the server. An unanchored NPC near a player is simulated, and movable, by
that client (measured: an unpinned NPC 6 studs away belonged to the player);
SetNetworkOwner(nil)after parenting (Network ownership doc). Purely decorative crowds can run as client Humanoids fed by one attribute per NPC every 5 s (Suphi Kaner, JyMxrcqEzu8 00:13:50). - The brain is data with hysteresis. States with
onEnter,onStay,onExitand transitions as a list (Miller, Roblox Learn, nlVpAZEkxgo 00:00:57). Enter Attack at 5 studs, leave above 6.5, give up 4 s after losing sight [added]. Pathfinding success ispcallANDStatus == Success(BrawlDev, ckA4fVkAjIA 00:15:48); recompute onBlockedonly when the index is at or after the next waypoint (Pathfinding doc). Re-issueMoveTo, because it gives up after 8 s. Price routes in oneCoststable (materials,PathfindingModifierandPathfindingLinklabels) instead of special-case code; compute only on the ground, in a loaded world, under 3,000 studs; a failed move snaps to that waypoint, never the goal (P12). - Stun cancels pending hits. A hit victim's queued swing is dropped and its requests refused
for a bounded stun (ArTheDev, Aoc9HkGHu_8 00:02:57). One hit per character per swing, never per
limb (Ludius 00:04:06). Knock a Humanoid back with a
LinearVelocityheld 0.2 s: oneApplyImpulsemoved a standing dummy 1.2 studs, theLinearVelocity10.5 [measured]. - Cars are constraints plus ownership. Per wheel one CylindricalConstraint and one SpringConstraint on the same attachments, upper limit below 0 (Suphi Kaner, FVOowr2DXbM 00:10:19). The driver owns the car while seated (Network ownership doc) and the server keeps a speed check; competitive racing goes to Server Authority. Check the steer sign live: this kit's first build turned left on D. Keep the center of mass low: dense low chassis, light body, seat low and central (FVOowr2DXbM 00:54:05). On exit, release the motors, give loose parts the same owner, leave through the highest exit point (P9, P14).
Establish first
- NPC count, and whether NPCs deal or take damage (server) or only decorate (client crowd).
- Hit model: melee box, hitscan ray, or projectile with travel time and drop (Weapons kit doc).
- Competitive or casual: competitive movement and vehicles go to Server Authority (scenario-roblox-networking).
- Platforms: phones are the most common device, so every combat action gets a key, a gamepad button
and an on-screen touch button bound through
InputBinding.UIButton(P7).
Defaults when unanswered: NPCs on the server, 6 buckets, 30 paths per second; melee box 5 by 5 by 5 studs at 3.5 studs; a 0.25-stud sphere sweep for projectiles; the car numbers below.
Procedure
Full code and test results: procedures.md. Modules: scripts/agentkit/gameplay/; Python: scripts/rbx_gameplay.py.
- Install. Goal: kit, boot scripts and Input Action instances in the open place. How:
rbx_gameplay.install(studio)writesSourcein Edit (P1). GATE: the playtest Server sees the hook and remotes; the Client seesGameplayInputs.Combat.Attack; no boot error in the console. - Probe the queries. Goal: facts for this build. How: the Edit probes (P2). GATE: Spherecast from inside returns the far part; Shapecast distance within 0.05 studs of the expected travel.
- Brain in Lune. Goal: a readable, tested decision table. How:
StateMachineplusNpcBrain(P4). GATE:lune run lune_unit.luaupasses. - Crowd and cost. Goal: a known server cost. How:
NpcServiceand the bench (P5). GATE: 0 of 100 roots client-owned; server fps and p95 recorded at each count; budget agreed with scenario-roblox-performance. - Hunt. Goal: perception, path and melee together. How:
walk_todrives the player in sight, then behind a wall (P6); path failure rules and route pricing (P12). GATE: the NPC reaches the player behind the wall and lands a hit; capture. - Combat. Goal: a combo that resists spam and stun. How: Input Action, intent remote,
ComboandHitbox.box(P7); projectiles withProjectile(P8). GATE: two front dummies at 58 health, the one behind untouched; under spam, no accepted swing closer than 0.24 s to the previous one; a 0.2-stud wall stops every projectile.user_keyboard_inputdelivers presses 0.13 to 0.20 s apart whatever the waits: flood tests fire the remote from a client script (P7). - Vehicle. Goal: drives, steers, stays upright. How:
Car.build,Car.serve,Car.controller(P9). GATE: driver owns the chassis; W for 3 s moves it forward more than 30 studs; W plus D turns right more than 20 degrees;UpVector.Ystays above 0.8; ownership returns to automatic on exit; leaving with the throttle held stops the car (P14); capture before and after. - Audit and review. How:
GameplayAuditplus the lead'sAudit(P3), the critique, one contact sheet. GATE: 0 errors.
Numbers
| Value | Default | Relative to |
| --------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Think rate | 10 per NPC per second | 6 buckets at 60 fps |
| Path budget | 30 per second | whole server |
| Detect, attack, leave range | 60, 5, 6.5 studs | target root; chase range 1.5 times detect |
| Lose sight | 4 s | last time seen |
| Humanoid MoveTo timeout | 8 s | re-issue every think |
| Path limits | 3,000 studs, 20,000 nodes; both fail as a bad Status | start to goal (P12) |
| Route costs | 1 default, 20 to 1,000 last resort, math.huge never | Costs keys: materials, modifier and link labels (P12) |
| Touch button | 72 px, bottom right, clear of jump | shown only while PreferredInput is Touch; layout check: scenario-roblox-ui (P7) |
| Combo damage | 10, 12, 20 | steps 1 to 3 |
| Combo gaps | 0.30, 0.30, 0.45 s with 0.8 tolerance | previous accepted swing |
| Finisher knockback | LinearVelocity 45 studs/s for 0.2 s, MaxForce mass times gravity times 20 | away from the attacker |
| Chain window, finisher lock, stun | 0.9, 0.6, 0.35 s | last swing or hit |
| Cast reach | 1,024 studs (shape casts), 15,000 (ray) | per call
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
prospecting
60.1kWhen the user wants to find and qualify prospects for outbound, or asks who to target first, which signal to prioritize, or where to spot buyers with the problem: buying signals, enrichment, verification, account research.
ad-creative
60.1kWhen the user wants to write or judge ad creative, or asks which ad, hook, or angle to run or kill: headlines, primary text, and variations for Google, Meta, LinkedIn, and TikTok, fresh angles when creative fatigues. Test hypotheses name the metric, comparison, and expected direction.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
