Roblox physics and spatial queries: assemblies, constraints, collision groups, Raycast and Shapecast, and network ownership. Use when parts fall through or jitter, Touched is unreliable, a ray hits the shooter, or BodyMovers need replacing. Not for hit legitimacy (`roblox-networking`), Humanoid movement (`roblox-characters`) or engine-neutral tuning (`physics-tuning`).
Ships in gamedev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
| Goal | Mechanism |
|---|---|
| sustained physical interaction | unanchored assembly plus modern constraints or forces |
| one-off physical change | ApplyImpulse / ApplyAngularImpulse |
| kinematic platform or path | scripted pivot or CFrame with an explicit passenger policy |
| character locomotion | Humanoid or Character Controller Library (roblox-characters) |
| hit test | server raycast, shapecast, or overlap with explicit filters |
| cosmetic trail or recoil | local visual motion; no gameplay authority |
part.AssemblyRootPart, part.AssemblyMass, part.Anchored and
part:GetNetworkOwner() from code. Identify the assembly root and who should own it.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..Touched is
neither reliable nor secure as a hit detector.LinearVelocity, AngularVelocity, VectorForce, AlignPosition and AlignOrientation;
migrate BodyMovers when you touch that system.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.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).
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.
AssemblyMass, not by trial values.SetNetworkOwner(nil)
for critical objects, then measure the server cost and responsiveness. Re-check ownership after
anchoring changes; it is not always kept..Touched events. The server validates
consequential hits, positions, timing and permissions independently.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.| Symptom | Likely cause | Remedy |
|---|---|---|
| welded mechanism will not move | one part anchored | inspect the whole assembly; anchor only world roots |
| force too strong or too weak | assembly mass ignored | read AssemblyMass; size force for the intended acceleration |
| fast projectile misses | discrete contact sampling | swept query (Blockcast, Spherecast, Shapecast) per step; see physics-tuning |
| ray hits the shooter or effects | no filter or query group | reuse explicit params and a query collision group |
| one target damaged many times | overlap returned several body parts | deduplicate by model; attack ID or cooldown |
| exploit fires impossible touches | client owns the relevant part | server query plus context validation; deliberate ownership |
| invisible trigger blocks players or queries miss it | the three Can* flags conflated | set CanCollide, CanTouch, CanQuery independently |
| attachments pile up | temporary constraint lifecycle missing | create and destroy constraint, attachments and connections together |
| collision group "does not exist" at startup | groups registered from several scripts | register in one script before assigning |
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.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.Last verified: 2026-11-11.
Workspace or a WorldModel (WorldRoot methods); the
PhysicsService collision-group methods are deprecated. A WorldModel keeps its own matrix
unless UseWorkspaceCollisionGroups is on.BodyPosition, BodyVelocity, BodyGyro and others) are deprecated in favour of
the constraint-based movers.roblox-networking for its rules..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.
What SKILL.md sets; muted values are Claude Code's defaults
/gamedev:roblox-physicsfrom gamedev
npx claudepluginhub cirobarone78/games-skill --plugin gamedevOther plugins' skills for the same job
80 skills in this plugin
/ai-behavior-trees-utility-aiEngine-neutral behavior tree and utility AI code for NPCs in any language: Blackboard, reactive composites, decorators and response-curve scoring. Use when an enemy keeps chasing after losing sight, restarts its action every frame or flip-flops between choices. Not for FSMs, steering or pathfinding (`game-ai`) or Unreal BT, EQS and StateTree (`unreal-behavior-trees`).
/audio-designEngine-neutral game audio technique: bus layout, volume sliders in decibels, loudness, ducking music under dialogue, adaptive music and SFX variation, with Godot, Unity and FMOD/Wwise mappings. Use when mixing a game, making music react to combat, fixing repetitive footsteps or beat sync, or a mix that clips or pumps. Not for the Godot audio API (`godot-audio`).
/