Make player unable to push NPCs

I’m working on simple NPCs and I want the player to be able to collide with them, but not push them. I also need the NPC to be able to walk around. Is there anyway I can get this working?
Thanks in advance! :smiley:

This might take some serious coding (at least from what I see). You need it to be unanchored to use :MoveTo, but you don’t want them to be pushed around.

Simple solve: Set the mass of the NPCs REALLY high, so it can’t be pushed AT ALL. Don’t know how well this would work with your system, but you can test it out. OR

More complex solve: Make a hitbox around the npc, exactly the same size. Use Collision Groups, so the NPC can’t hit it, and anchor the part. Then, constantly set the position of the part to the NPC’s position. This way, it won’t interfere with how the NPC moves, but the players will THINK they are standing on it, when in reality they are just touching the fake hitbox. Might work :man_shrugging:

I have no idea if these will work, these are just the ways I might try to go about doing it. Best of luck!

2 Likes

I’ll try both of these out and get back to you! :slight_smile:

I know this is pretty much solved but if you want a more thorough explanation of Infinite_Vision’s solution, here’s the same solution.

It’s actually simple.
Just anchor the humanoid root part of the Npc.

Edit: oops didn’t see the second part of the question.

So you can change the density of the npc’s humanoidrootpart or the uppertorso to achive this effect without any advanced coding I believe.

(U can change the density under the customphysicalproperties value.)

1 Like