mcpField
R
roblox-physics

roblox-physics

github.com/tabooharmonyDevelopment1402.1k installsUpdated 2w ago
Repository

About roblox-physics

roblox-physics is a skill for developers building physics-driven Roblox gameplay, from vehicles to ragdolls and moving platforms. It covers constraints, ownership, authority, and common setup pitfalls.

Key features

  1. 01Select constraints and actuators
  2. 02Set up vehicle physics
  3. 03Manage ragdoll state recovery
  4. 04Choose network ownership and authority
  5. 05Check common constraint pitfalls

Use cases

  1. 01Building vehicles with suspension and steering
  2. 02Creating ragdolls that restore character state
  3. 03Designing projectiles and moving platforms

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tabooharmony/roblox-brain --skill roblox-physics

After installing, type/roblox-physicsin Claude Code to confirm it loaded.

Bundled filesreferences/full.md

Details

From the project README

Roblox Physics

When to Load

Use this skill when building physics-driven gameplay: vehicles, ragdolls, projectiles, mechanical contraptions, elevators, swinging platforms, or anything using constraints and forces.

Quick Reference

Constraint Types

Mechanical: HingeConstraint, PrismaticConstraint, CylindricalConstraint, BallSocketConstraint, UniversalConstraint, WeldConstraint/RigidConstraint Motion: AlignPosition, AlignOrientation, LinearVelocity, AngularVelocity, VectorForce, Torque Spring/Rope: SpringConstraint, RopeConstraint, RodConstraint

Attachment Pattern

Constraints connect via Attachment objects. Create one on each part, set Attachment0/Attachment1, and parent the constraint to part0. Actuator types include None, Motor, and Servo.

Vehicles

Vehicles: use motorized HingeConstraint wheels, SpringConstraint suspension, servo steering, and CustomPhysicalProperties for friction tuning.

Ragdoll

Track the joints and instances each ragdoll changes; recover only owned state, and coordinate overlapping effects before restoring movement. BallSocketConstraint recipe: full.md.

Authority and Network Ownership

Classic projects: automatic ownership can give an unanchored assembly to a nearby player. SetNetworkOwner(nil) keeps it server-owned; SetNetworkOwner(player) gives a player simulation ownership. Treat player-owned physics as untrusted and validate gameplay outcomes.

Server Authority: set Workspace.AuthorityMode = Server with its required settings. Core objects can remain server-owned while prediction keeps controls responsive, so the classic secure-but-laggy trade-off does not apply. SetNetworkOwner() is not a substitute.

Rule: choose the model first. Keep NPC and gameplay-critical objects authoritative; give client ownership to non-critical physics only when the resulting behavior is acceptable and tested.

Common Gotchas
  • Constraints do nothing on Anchored parts
  • Both Attachment0 AND Attachment1 required (missing one = silent fail)
  • Over-constraining = jitter. Tune mass with CustomPhysicalProperties
  • Use Raycast for hitscan, Touched only for slow physics projectiles
  • Always set a lifetime on physics projectiles See references/full.md for recipes, API details, and checks.

Comments

Markdown supported