roblox-physics
Skill0 starsChanged 11 days agoApache-2.0View on GitHub
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.
6 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- ForgeyClap/Forge-Coreedited, first seen Nov 16, 2026
- gamedev-skills/awesome-gamedev-agent-skillsedited, first seen Nov 11, 2026
- EL4CTEO/roblox-skillstheir own version, first seen Sep 28, 2026
- TabooHarmony/roblox-braintheir own version, first seen Sep 23, 2026
- nonlooped/roblox-suitetheir own version, first seen Sep 19, 2026
- szlay/roblox-basetheir own version, first seen Jul 24, 2026
Used with
Projects with it also use roblox-testing.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zukoma42-devSkillroblox-testing
MCPを使った自動テスト・デバッグスキル。start_stop_play、 run_script_in_play_mode、get_console_outputを活用した テスト→分析→修正ループを回す。「テスト」「デバッグ」「エラー」 「バグ」「動かない」「プレイテスト」「プロファイリング」でトリガー。
Also in 3 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- gamedev-skills/awesome-gamedev-agent-skills★ 9k21% same
- ForgeyClap/Forge-Core★ 274% same
Wrote their own version · 4
- TabooHarmony/roblox-brain★ 224same name
- EL4CTEO/roblox-skills★ 162same name
- nonlooped/roblox-suite★ 39same name
- szlay/roblox-base★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository75 other files it gives its agents.
- routerSkill
- ai-behavior-trees-utility-aiSkill
- audio-designSkill
- camera-systemsSkill
- create-game-assetsSkill
- dialogue-systemsSkill
- game-aiSkill
- game-feelSkill
- game-ui-uxSkill
- input-systemsSkill
- level-designSkill
- performance-optimizationSkill
- physics-tuningSkill
- procedural-genSkill
- save-systemsSkill
- shader-programmingSkill
- card-gameSkill
- fps-shooterSkill
- platformerSkill
- puzzleSkill
- roguelikeSkill
- rpgSkill
- survival-craftingSkill
- tower-defenseSkill
- visual-novelSkill
- godot-2d-movementSkill
- godot-3d-essentialsSkill
- godot-animationSkill
- godot-audioSkill
- godot-csharpSkill
- godot-exportSkill
- godot-gdscript-headless-testingSkill
- godot-gdscriptSkill
- godot-multiplayerSkill
- godot-nodes-scenesSkill
- godot-physicsSkill
- godot-resourcesSkill
- godot-shadersSkill
- godot-signals-groupsSkill
- godot-tilemapSkill
- godot-ui-controlSkill
- demarrer-un-jeuSkill
- bevy-ecsSkill
- love2d-coreSkill
- pygame-coreSkill
- roblox-charactersSkill
- roblox-datastoresSkill
- roblox-luauSkill
- roblox-networkingSkill
- roblox-studio-workflowSkill
- roblox-uiSkill
- unity-animationSkill
- unity-build-pipelineSkill
- unity-csharp-scriptingSkill
- unity-input-systemSkill
- unity-navmeshSkill
- unity-physicsSkill
- unity-scriptableobjectsSkill
- unity-tilemap-2dSkill
- unreal-behavior-treesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Use for BasePart assemblies, constraints, collision/query policy, ray/overlap queries, forces, impulses, moving physical objects, network …
- Very specific: line 21
Use when Touched is unreliable/security-sensitive, parts tunnel or jitter, a mechanism breaks when anchored, or old BodyMover patterns …
- Very specific: line 42
Define interaction policy: Write the collision-group matrix and separately decide CanCollide, CanTouch, and CanQuery.
- Very specific: line 44
Choose simulation or query: Do not use .Touched as a universal hit detector.
- Distinctive: line 54
Verify under load and multiplayer: Test anchored/unanchored transitions, mass extremes, collision matrix, fast motion, multiple clients, …
- Very specific: line 114
Prefer attachments plus modern constraints over BodyPosition, BodyVelocity, BodyGyro, and other deprecated BodyMovers when authoring or …
- Very specific: line 137
Read references/queries-and-ownership.md for collision/query matrices, assembly debugging, ownership security, migration choices, and the …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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. - 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
endThe 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
endBounds queries use bounding boxes and can include multiple parts from one target; deduplicate and
perform exact/gameplay checks as needed. For exact geometry use WorldRoot:GetPartsInPart(part, overlapParams)
only when its additional cost is justified. Note OverlapParams.RespectCanCollide decides whether a
query honours CanCollide or CanQuery — set it deliberately, or it silently overrides the flag
policy below. OverlapParams.Tolerance controls contact slop.
Assemblies, force, and ownership
- Welded parts form one rigid assembly; force, impulse, velocity, mass, and ownership operate on that assembly. Anchoring a part changes simulation/ownership and can make an assembly effectively infinite mass.
- Apply an impulse for a one-time change; use a force or velocity constraint for sustained control.
Setting
AssemblyLinearVelocityis an immediate state change, not a continuous force model. - Prefer attachments plus modern constraints over
BodyPosition,BodyVelocity,BodyGyro, and other deprecated BodyMovers when authoring or revising a mechanism. - Automatic ownership may move nearby unanchored assemblies to clients. Use
SetNetworkOwner(nil)conservatively for critical objects, then measure responsiveness/server cost. Visualize network owners in Studio. - A client owner can manipulate physical results and
.Touchedobservations. The server validates consequential hits, positions, timing, and permissions independently.
Common failures
| Symptom | Likely cause | Remedy |
| welded mechanism will not move | one part anchored | inspect full assembly; anchor only intentional world roots |
| force behaves too strongly/weakly | assembly mass ignored | inspect AssemblyMass; tune force/impulse by intended acceleration |
| hit misses fast projectile | discrete touch sampling/tunneling | swept query — WorldRoot:Blockcast(), Spherecast(), or Shapecast() — plus physics-tuning; do not rely only on .Touched |
| ray hits shooter/effects | filters/collision group absent | reuse explicit params and query group |
| same target damaged many times | overlap returned multiple body parts | deduplicate by target model and enforce attack ID/cooldown |
| exploit fires impossible touch | client owns relevant physics | server query/context validation; deliberate ownership |
| invisible trigger blocks or cannot query | three flags conflated | set CanCollide, CanTouch, CanQuery independently |
| mechanism leaks attachments | temporary constraint lifecycle missing | own and destroy constraints, attachments, and connections together |
Resources
- Read
references/queries-and-ownership.mdfor collision/query matrices, assembly debugging, ownership security, migration choices, and the physics verification matrix.
Related skills
physics-tuning— timestep, jitter, tunneling, mass ratios, and stability methodology.roblox-characters— Humanoid/custom movement and respawn lifecycle.roblox-networking— authoritative validation of client-requested physical actions.roblox-studio-workflow— visualization, Output, and multi-client verification.
Primary references
https://create.roblox.com/docs/physics/assemblieshttps://create.roblox.com/docs/physics/network-ownershiphttps://create.roblox.com/docs/workspace/raycasting
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.

