Collision groups
collisionControl which parts physically collide by creating collision groups, assigning parts, and setting collidability. Cast rays or overlap volumes to detect hits, blockages, and geometry intersections.
Instructions
Controls which parts physically collide with which.
This is the right answer to 'these should pass through each other'. The alternative — turning CanCollide off — disables collision against everything, so a ghost that should pass through walls also falls through the floor.
The order is: create a group, assign parts to it, then set what it is collidable with. A group with nothing assigned does nothing.
Assigning a Model assigns every part inside it, which is almost always what is meant.
Groups are not undoable and not scoped to a session: remove when one was created to try something and is no longer wanted, rather than leaving it registered in the place indefinitely. The built-in "Default" group cannot be removed.
Groups belong to a world, not to the place. The Workspace is the default and is what nearly every question is about; a WorldModel inside a ViewportFrame keeps its own separate registry, so pass worldModel to reach that one. A group of the same name in each is two different groups.
THE SAME TOOL ANSWERS WHAT IS ACTUALLY THERE. cast fires a ray, block or sphere and reports the first thing it meets — the part, the hit point, the surface normal, the material and the distance. overlap lists everything inside a box, a radius, or overlapping an existing part.
That is the one question the Explorer cannot answer. A path tells you an instance exists and where its pivot sits; it does not tell you the door frame is clipping into the wall, that the spawn is buried a stud inside the floor, or that nothing stands between the turret and the player. Geometry wrong in exactly those ways looks perfect in inspect.
The queries live here because they ARE collision queries: they honour the very groups the other half of this tool manages. A cast run in the wrong collisionGroup reports a clear path through a wall the player cannot walk through — a wrong answer indistinguishable from a right one. A miss comes back as hit: false, which is a real answer and usually the one being checked for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | overlap only: the centre, for region "box" or "radius". | |
| to | No | cast only: a point to aim at. Use this for sightlines — it saves working out a direction vector, which is where sign errors live. | |
| from | No | cast only: where the cast starts, e.g. "12, 0, 5". | |
| only | No | cast/overlap: consider ONLY these instances and their descendants. | |
| path | No | overlap region="part" only: the part to test against. | |
| size | No | cast shape="block" or overlap region="box": the volume size. | |
| with | No | collidable only: the other group. | |
| group | No | The group's name. Required for everything but list. | |
| limit | No | overlap only: how many parts to list. Defaults to 50. | |
| paths | No | assign only: parts or models to put in the group. | |
| shape | No | cast only: 'ray' is a line and the usual choice. 'block' and 'sphere' sweep a volume along the same path — use them when the thing moving has width, e.g. whether a character fits through a gap rather than whether a point does. | |
| action | No | Groups: 'list' shows them and changes nothing, then 'create', 'assign', 'collidable', 'remove' (which unregisters a group entirely — not the same as un-assigning parts). Queries: 'cast' fires a shape and reports the first hit, 'overlap' lists what is inside a volume. | list |
| ignore | No | cast/overlap: skip these and their descendants. The usual case is the character doing the looking, which otherwise blocks its own cast at zero distance. | |
| radius | No | cast shape="sphere" or overlap region="radius": the radius. | |
| region | No | overlap only: 'box' and 'radius' need `at`; 'part' takes `path` and reports what overlaps that part — the fastest way to find things clipping through each other. Defaults to 'box'. | |
| distance | No | cast only: how far along `direction`. Defaults to 100. | |
| studioId | No | Target Studio; omit for the active one. | |
| direction | No | cast only: which way to go, e.g. "0, -1, 0" for down. Used with `distance`. | |
| collidable | No | collidable only: whether the two groups collide. False makes them pass through. | |
| worldModel | No | Path to a WorldModel whose own collision groups this call is about, e.g. "StarterGui.Preview.Viewport.WorldModel". Omit for the Workspace, which is what you want unless the parts in question live inside a ViewportFrame. | |
| ignoreWater | No | cast only: pass through terrain water instead of hitting it. | |
| collisionGroup | No | cast/overlap: run the query as if from a part in this group. Required for a truthful answer in any place that uses groups. | |
| respectCanCollide | No | cast/overlap: skip parts with CanCollide off. Off by default, matching the engine — leave it off to ask what is there, turn it on to ask what would stop a player. |