How do I make a part where some players can go through but npcs cant

basicaly im making a game where npcs follow you and im making an obstacle where you go through a part but npcs cant so you neeed to find a button that makes it so npcs can also go through.

ive looked all over devforum and i cant find a slution. im not experienced with collision grous and idk how it works. ty for help :grin:

1 Like

I think your looking for Collision Groups

1 Like

kk ill look through the document ty :grin:

1 Like

Should be simple to implement. Let me know if your stuck!

1 Like

If you don’t want to use collision groups (or they don’t work for your use case), you can use NoCollisionConstraints.

When you want to let a player through the door, create one of those for each of the player’s body parts (I’d recommend using character:GetChildren() and :IsA("BasePart")), set its Part0 and Part1 to the body part and the thing you want them to be able to move through, and parent it to the body part (so the constraints get cleaned up if the player respawns).

1 Like

hi i forgot to put the solution mark on the other guy but i resolved my problem already ty :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.