AIPM
Theme

AIPM package

Roblox Physics

@gamedev-skills/roblox-physics@1.0.0

>

Scanned · no issues · Nov 30, 2026

GitHub stars: ★ 12K

LinkedInPost

Install Skill

Pins this version in aipm.package.json and aipm-lock.json.

aipm add @gamedev-skills/roblox-physics@1.0.0

Without project tracking

Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.

aipm add @gamedev-skills/roblox-physics@1.0.0 --no-init

How to use

Install the skill above, then run this in your AI tool:

/roblox-physics <your description>

About

Simulation, character control, hit detection and visual-only motion are different jobs. Pick the mechanism first, then the API. Whether a hit counts is a server validation decision owned by `roblox-networking`; this skill supplies the queries it uses.

Source

What gets added to your project

Preview every file this package writes on install before you run the command above.

Summary

>

Skill instructions

Roblox physics

Simulation, character control, hit detection and visual-only motion are different jobs. Pick the mechanism first, then the API. Whether a hit counts is a server validation decision owned by roblox-networking; this skill supplies the queries it uses.

Decide the mechanism

GoalMechanism
sustained physical interactionunanchored assembly plus modern constraints or forces
one-off physical changeApplyImpulse / ApplyAngularImpulse
kinematic platform or pathscripted pivot or CFrame with an explicit passenger policy
character locomotionHumanoid or Character Controller Library (roblox-characters)
hit testserver raycast, shapecast, or overlap with explicit filters
cosmetic trail or recoillocal visual motion; no gameplay authority

Workflow

  1. Inspect the mechanism. In Studio, turn on the assembly, constraint and network-owner visualizations; or read part.AssemblyRootPart, part.AssemblyMass, part.Anchored and part:GetNetworkOwner() from code. Identify the assembly root and who should own it.
  2. Write the interaction policy. A collision-group matrix, then CanCollide, CanTouch and CanQuery decided separately per role. Register groups once with Workspace:RegisterCollisionGroup() and CollisionGroupSetCollidable() (or the Collision Groups editor), from a single script so assignment never races registration.
  3. Choose simulation or query. A ray for a line, a shapecast for a moving volume, an overlap for a static volume, and simulation contacts only when a physical response is wanted. .Touched is neither reliable nor secure as a hit detector.
  4. Apply motion at assembly level. Forces on any part act on the whole assembly. Use LinearVelocity, AngularVelocity, VectorForce, AlignPosition and AlignOrientation; migrate BodyMovers when you touch that system.
  5. Set ownership deliberately. Server-own gameplay-critical loose assemblies when needed; client ownership improves response but never authorizes results.
  6. Bound cost and lifetime. Reuse query params, cap query frequency and result counts, and destroy temporary constraints, attachments and connections together.
  7. Check from code. With the Studio MCP server connected, start play and use execute_luau on the Server datamodel to print the facts the change depends on: AssemblyRootPart, AssemblyMass, GetNetworkOwner(), workspace:CollisionGroupsAreCollidable(a, b), and the result of one test query; then read get_console_output. Without MCP, ask the user to run the same snippet from the Command Bar during play and paste the Output. Fast movers, ownership hand-off and two-client interaction need a Server & Clients run.

Pattern: filtered server raycast

lua
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   -- direction length is the 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

muzzlePosition and aimDirection must come from server-known character and weapon state. A raycast from a client-supplied origin is not validation (see roblox-networking).

Pattern: overlap volume with explicit policy

lua
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 test bounding boxes and return several parts per target, so deduplicate by model. WorldRoot:GetPartsInPart() is exact but costs more. OverlapParams.RespectCanCollide switches the query from CanQuery to CanCollide; set it on purpose or it silently overrides the flag policy.

Assemblies, force, and ownership

  • Welded parts form one rigid assembly; force, impulse, velocity, mass and ownership act on the assembly. One anchored part anchors the whole assembly.
  • Tune forces and impulses from intended acceleration times AssemblyMass, not by trial values.
  • Automatic ownership moves nearby unanchored assemblies to clients. Call SetNetworkOwner(nil) for critical objects, then measure the server cost and responsiveness. Re-check ownership after anchoring changes; it is not always kept.
  • A client owner can fake physical results and .Touched events. The server validates consequential hits, positions, timing and permissions independently.
  • If Workspace.AuthorityMode is Server, the server owns simulation and clients predict nearby assemblies with rollback. Drive predicted forces and constraints from RunService:BindToSimulation() on both sides, not from Heartbeat or client-only scripts, and expect custom physics scripts to need changes when a place switches modes.

Gotchas

SymptomLikely causeRemedy
welded mechanism will not moveone part anchoredinspect the whole assembly; anchor only world roots
force too strong or too weakassembly mass ignoredread AssemblyMass; size force for the intended acceleration
fast projectile missesdiscrete contact samplingswept query (Blockcast, Spherecast, Shapecast) per step; see physics-tuning
ray hits the shooter or effectsno filter or query groupreuse explicit params and a query collision group
one target damaged many timesoverlap returned several body partsdeduplicate by model; attack ID or cooldown
exploit fires impossible touchesclient owns the relevant partserver query plus context validation; deliberate ownership
invisible trigger blocks players or queries miss itthe three Can* flags conflatedset CanCollide, CanTouch, CanQuery independently
attachments pile uptemporary constraint lifecycle missingcreate and destroy constraint, attachments and connections together
collision group "does not exist" at startupgroups registered from several scriptsregister in one script before assigning

Resources

  • Read references/queries-and-ownership.md when designing collision groups, query filters, a vehicle or other ownership-sensitive object, or a BodyMover migration; it has the flag roles, query choice, ownership debugging, and the physics test matrix.

Related skills

  • physics-tuning: timestep, jitter, tunnelling, mass ratios, and feel.
  • roblox-characters: Humanoid and custom movement across respawns.
  • roblox-networking: authoritative validation of client-requested physical actions.
  • roblox-studio-workflow: visualization, Output, and multi-client verification.

Version notes

Last verified: 2026-11-11.

  • Collision groups are registered on Workspace or a WorldModel (WorldRoot methods); the PhysicsService collision-group methods are deprecated. A WorldModel keeps its own matrix unless UseWorkspaceCollisionGroups is on.
  • BodyMovers (BodyPosition, BodyVelocity, BodyGyro and others) are deprecated in favour of the constraint-based movers.
  • Server Authority reached full release in July 2026; see roblox-networking for its rules.
  • To re-check an API: append .md to its Creator Hub URL, or start from https://create.roblox.com/docs/llms.txt.

Sources: https://create.roblox.com/docs/physics/assemblies, https://create.roblox.com/docs/physics/network-ownership, https://create.roblox.com/docs/workspace/raycasting, https://create.roblox.com/docs/workspace/collisions, https://create.roblox.com/docs/projects/server-authority.

Loading package files…

Share this package

Add an Install with AIPM badge

Add this badge to a GitHub README so readers can open the package page and install the same version.

Install with AIPM
[![Install with AIPM](https://www.aipm-registry.com/install-with-aipm.svg)](https://www.aipm-registry.com/skills/gamedev-skills/roblox-physics/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)

Publisher

gamedev-skills

This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.

AI assistant context

What this skill is for

@gamedev-skills/roblox-physics@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: >

Install
aipm add @gamedev-skills/roblox-physics@1.0.0
Use after install
/roblox-physics <your description>

Tool targets

Install command by target

Add --no-init to any of these when you want the skill files without aipm.package.json or aipm-lock.json.

cursor

Run this variant when you want to install the package into cursor.

aipm add @gamedev-skills/roblox-physics@1.0.0 --target cursor --ci

claude

Run this variant when you want to install the package into claude.

aipm add @gamedev-skills/roblox-physics@1.0.0 --target claude --ci

Discussion

Comments (0)

Loading comments…

Keep exploring

gamedev-skills/create-game-assets

>

Published by gamedev-skills

skillScanned · no issues★ 12KImported · UnverifiedAll toolsNov 30, 2026, 12:30 AM15.9 KBApache-2.0

gamedev-skills/level-design

>

Published by gamedev-skills

skillScanned · no issues★ 12KImported · UnverifiedAll toolsNov 30, 2026, 12:30 AM8.32 KBApache-2.0

gamedev-skills/threejs-gltf-loading

>

Published by gamedev-skills

skillScanned · no issues★ 12KImported · UnverifiedAll toolsNov 30, 2026, 12:30 AM6.94 KBApache-2.0

Package FAQ

Install and compatibility

How to install
Run aipm add @gamedev-skills/roblox-physics@1.0.0 in a project that has AIPM initialized.
Supported tools
@gamedev-skills/roblox-physics@1.0.0 supports All tools.

Before installing

AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.