rbx-combat-melee
Skill0 starsChanged 3 months agoMITView on GitHub
Melee combat that feels like a top battlegrounds game — server-side hitboxes, escalating combos, block/parry with real frame windows, knockback finishers. Use when the user says "make a sword", "add melee/fists/punching", "combo system", "add blocking/parrying", or when existing melee feels floaty, spammy, or hits through blocks. Do not use for guns and projectiles — load rbx-combat-ranged — or for "hits don't register" complaints — load rbx-combat-hitreg instead.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-architectureSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-musicSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-camera-shakeSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-crossserverSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-schemaSkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Check os.clock() - stateStartTime <= 0.15 on the defender's Blocking state when the server resolves the swing.
- Very specific: line 65
Create OverlapParams/RaycastParams once per weapon, not per swing.
- Very specific: line 90
Read: module-library.md (an existing CombatStateMachine/DamageCalculator ships again unchanged), the game's projects.md block (weapon …
- Very specific: line 92
Write: tuned timing/hitbox constants per weapon into the game's projects.md block once the user approves the feel.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
rbx-combat-melee
Laws
- Client sends intent, server swings. The attack remote carries zero arguments — no targets, no damage, no positions. The server runs the hitbox from its own copy of the attacker's HumanoidRootPart and applies every HP change. A remote that accepts a target list is an exploit, not a feature.
- One state machine gates everything. Idle → Attacking → Recovery → Idle, with Blocking,
Dodging, and Stunned as interrupts. Every action request checks
canTransitionfirst; attacking while stunned or blocking while mid-swing must be impossible server-side, not merely un-animated client-side. - Spatial query for melee, raycast for thrusts.
workspace:GetPartBoundsInBoxwith anOverlapParamsexcluding the attacker's character is the default swing hitbox; a single raycast only suits narrow stabs (spears). Never.Touched— it fires on physics contact, which lags, double-fires, and misses fast swings. - Every landed hit is felt. Impact VFX + hit sound + damage number + 0.05–0.10s
hit-stop, per the
rbx-combatrouter defaults. A silent hit reads as broken even when the HP moved. - Dedup per swing. Track hit characters in a set for the swing; one target takes one hit per swing, and cap targets at 5 to close AoE farming.
Recipes
Hitbox dimensions (box CFrame = root × CFrame.new(0, 0, -range/2)): dagger/fist 4–5 × 4 × 5 studs, sword 6–8 × 5 × 6, greatsword 8–12 × 7 × 7, spear 10–14 × 3 × 5, AoE slam 8–10 × 10 × 8 (range × width × height).
Timing set (the tuned defaults; change one, retest feel): attack active 0.35s, recovery 0.4s, attack cooldown 0.3s server-enforced, combo window 0.8s after each hit, max combo 4, dodge 0.5s with 1.5s cooldown, default stun 1.0s.
Combo escalation: hit 1 ×1.0 → hit 2 ×1.1 → hit 3 ×1.25 (widen box to 7 studs) → hit 4 ×1.5 finisher with knockback. Combo count lives in the server state machine; it resets to 0 when recovery expires without a chained input.
Block/parry: blocking cuts incoming damage 80%; a block started within 0.15s
(~9 frames at 60fps) before the hit lands is a parry — zero damage, attacker stunned 1.2s.
Check os.clock() - stateStartTime <= 0.15 on the defender's Blocking state when the
server resolves the swing. Parry stun is the counterplay budget: heavy weapons get wider
parry windows, not more damage.
Knockback: LinearVelocity on the target's RootAttachment (never the deprecated
BodyVelocity), force 50 for finishers, destroyed after 0.3s. Dodge = same helper on self,
force 60 forward, plus a 0.5s invulnerability tag the hitbox loop checks.
Damage: route through one calculator — base × buffs × (1 − defense, capped 0.9) × crit × combo multiplier, floored at 1. Clamp every multiplier; uncapped buff stacking is how one exploit turns into ×∞ damage.
Performance budget
Create OverlapParams/RaycastParams once per weapon, not per swing. One Heartbeat loop
updates all state machines — never one loop per player. Damage-number BillboardGuis come
from a pool (rbx-juice-numbers). At 20+ fighters, pre-filter hitbox candidates by
distance before the bounds query.
Load with
rbx-vfx-impacts, rbx-audio-sfx — every hit is seen and heard, don't ask, include both.
rbx-juice-numbers for damage numbers, rbx-juice-screenfx + rbx-camera-shake for
hit-stop and shake, rbx-physics-ragdoll for kill spectacle, rbx-anim-rigs when swings
need real character animations. Validation depth: rbx-combat-hitreg.
AI-tells
- ☐ Attack remote carries targets, damage, or a position argument
- ☐
.Touched-based sword hitbox - ☐ Cooldown or combo count tracked only on the client
- ☐ Hits land with no VFX, sound, or hit-stop
- ☐ One target hit twice by the same swing (no per-swing dedup set)
- ☐ Block state that still allows attacking (no state machine)
- ☐ BodyVelocity used for knockback
- ☐ New OverlapParams constructed inside the swing handler
Memory
Read: module-library.md (an existing CombatStateMachine/DamageCalculator ships again
unchanged), the game's projects.md block (weapon roster, damage scale already in play).
Write: tuned timing/hitbox constants per weapon into the game's projects.md block once
the user approves the feel; reusable state-machine and knockback modules into
module-library.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

