roblox-physics
What it does
This skill explains how to make Roblox parts behave physically, such as falling, colliding or being hit by a projectile. It is for developers building vehicles, projectiles or moving objects.
When to use it
- ✓When you need parts to fall, bounce, collide or move with forces in Roblox.
- ✓When you want a projectile or hit detection to work reliably instead of relying on Touched.
- ✓When an old BodyMover script or a constrained object is broken or unstable.
Skill link
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/other-engines/roblox-physics/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My Roblox projectile passes through walls, how do I make it hit them reliably?”
5 new skills a week. 1 minute to read.
How it works
It helps the agent choose the right mechanism for each goal, such as physical simulation, instant impulses or server hit checks, and set collision and query rules that match the design.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Roblox physics
Choose deliberately between simulation, character control, hit detection, and visual-only motion;
they are different jobs. Targets Roblox's rolling platform APIs. Pair with physics-tuning for
engine-neutral stability and feel.
When to use
- Use for BasePart assemblies, constraints, collision/query policy, ray/overlap queries, forces, impulses, moving physical objects, network ownership, or physics cleanup.
- Use when
Touchedis unreliable/security-sensitive, parts tunnel or jitter, a mechanism breaks when anchored, or old BodyMover patterns appear.
When not to use: ordinary Humanoid lifecycle/control belongs to roblox-characters; remote
validation belongs to roblox-networking; decorative UI/world motion may only need a tween.
Decide the system first
| Goal | Mechanism |
|---|---|
| sustained physical interaction | unanchored assembly + modern constraints/forces |
| instantaneous physical change | ApplyImpulse / ApplyAngularImpulse |
| kinematic platform/path | controlled pivot/transform with an explicit passenger policy |
| character locomotion | Humanoid/custom character controller (roblox-characters) |
| authoritative hit test | server raycast/overlap with filters and gameplay validation |
| cosmetic trail/recoil | local visual motion; no gameplay authority |
Workflow
- Inspect the mechanism. In Studio, visualize assemblies, anchors, constraints, collision groups, massless parts, and network owners. Identify the assembly root and intended authority.
- Define interaction policy. Write the collision-group matrix and separately decide
CanCollide,CanTouch, andCanQuery. These flags are not interchangeable. Register groups in the Studio Collision Groups editor or withWorkspace:RegisterCollisionGroup()andWorkspace:CollisionGroupSetCollidable(); thePhysicsServicecollision-group methods are deprecated and forward toWorkspace. - Choose simulation or query. Do not use
.Touchedas a universal hit detector. Use a ray for a path/line, an overlap query for a volume, and simulation contacts when physical response is actually required. - Apply motion at assembly level. Forces on a part affect its assembly. Use modern
LinearVelocity,AngularVelocity,VectorForce,AlignPosition, andAlignOrientationconstraints as appropriate; migrate deprecated BodyMovers when changing that system. - Set ownership deliberately. Server-own gameplay-critical loose assemblies when required; client ownership can improve responsiveness but never authorizes gameplay results.
- Bound cost and lifetime. Reuse query parameters, cap query frequency/result count, remove temporary constraints/attachments, and disconnect event listeners.
- Verify under load and multiplayer. Test anchored/unanchored transitions, mass extremes, collision matrix, fast motion, multiple clients, ownership changes, streaming, and cleanup.
Pattern: filtered server raycast
local Workspace = game:GetService("Workspace")
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {shooterCharacter}
params.IgnoreWater = true
params.CollisionGroup = "WeaponQuery"
local direction = aimDirection.Unit * MAX_RANGE
local result = Workspace:Raycast(muzzlePosition, direction, params)
if result then
local model = result.Instance:FindFirstAncestorOfClass("Model")
local humanoid = model and model:FindFirstChildOfClass("Humanoid")
if humanoid and serverCanDamage(shooter, model, result.Position) then
humanoid:TakeDamage(serverWeaponDamage(shooter))
end
end
The server must validate the origin/direction against server-known character/weapon state; do not accept an arbitrary client origin and treat the raycast itself as validation.
Pattern: overlap volume with explicit policy
local params = OverlapParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {sourceCharacter}
params.CollisionGroup = "DamageQuery"
params.MaxParts = 64
local seen: {[Model]: boolean} = {}
for _, part in Workspace:GetPartBoundsInBox(hitboxCFrame, hitboxSize, params) do
local model = part:FindFirstAncestorOfClass("Model")
if model and not seen[model] then
seen[model] = true
validateAndApplyHit(model)
end
end
Bounds queries use bounding boxes and can include multiple parts from one ta
FAQ
Why not use Touched for hit detection?
The skill notes that Touched can be unreliable and open to abuse, so it prefers server raycasts or overlap checks.
Does this cover character movement?
No. Humanoid movement is covered by a separate Roblox character skill.
Does this cover tuning physics feel?
Only partly. Engine-neutral tuning is covered by a separate physics tuning skill.
Details
Original description by the author
Implement Roblox physical simulation and queries with assemblies, anchoring, constraints, collision groups, CanCollide/CanTouch/CanQuery, raycasts and overlap queries, mass, impulses, forces, velocity, moving assemblies, cleanup, and network ownership. Use for Roblox collisions, hit detection, RaycastParams, PhysicsService, projectiles, vehicles, knockback, constraints, deprecated BodyMovers, unstable motion, or client-owned physics exploits.
Popularity
- GitHub stars
- 6.6k
- Ranking position
- #13840
- License
- Apache-2.0
- Updated
- 10/28/2026
Comments
- …
More skills from this repository
router
6.6kHelps your agent pick the right game development skill for a request by detecting your engine and the kind of task you need.
ai-behavior-trees-utility-ai
6.6kHelps your agent build a behavior tree and utility AI system for game enemies and characters that choose actions by priority and score.
audio-design
6.6kTeaches your agent game audio mixing: buses, decibel volume, ducking under dialogue, adaptive music and sound effect variation.
camera-systems
6.6kHelps your agent build game cameras that follow smoothly, stay inside the level, and orbit or look around in 3D.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.