Only Players Walk trhough parts and no NPC's (Solved)

I’m trying to figure out how to do that player can walk through parts, but no npc’s.

Anyone knows how?

1 Like

Create collision groups for players and those parts, and make it so those two collision groups cant collide.

Another easier way is to locally set CanCollide of those parts to false.

1 Like

Is there another easier way?


1 Like

It doesnt get easier than setting the CanCollide to false with a local script.

1 Like

But I only want that players walk through that part and not npcs or like other things

1 Like

Both of the methods i provided will make sure only players can walk through, since npcs are handled on the server.

Collision Groups is the easier way but you need to experiment around a bit before getting used to the Collision Groups Editor located on the Model>Advanced tab:

To achieve what you want, you will have to create a collision group for NPCs (that I will refer as “NPC” for the purposes of this post) and another one for the barrier (that again, I will refer as “NPCBarrier” for the purposes of this post) that will separate NPCs from everything else.

Then, you will set collision setting for interactions between “Default” and “NPCBarrier” collision groups to false by finding the checkbox that has “Default” as the row name and “NPCBarrier” as the column name (or vice versa) and clicking on it until it’s grey like in the screenshot below:


Finally, after doing that, select all BaseParts (meshes, unions, parts, ect.) and select them inside the NPC model. After that click on the button with + sign on it near the “NPC” row without unselecting the parts, this will properly assign the CollisionGroupIds without resorting to trial and error.

1 Like