Ever I push a player/NPC, I usually go through him, and I haven’t found a way to solve this, can anyone help me?
You could try disabling collisions for player and NPCs?
Anchor the npcs humanoid root part
The player needs to be able to deal with the other player, and if I activate the anchor, the player/NPC doesn’t move.
You are trying to prevent them from going through each other so I assume you don’t want to disable collisions right?
Yes. And I don’t want to anchor. I need the movimentation of NPC/Enemy
Anyone can help me? I need help
- Make a big invisible wall/part with the width of the npc. (This acts like a hitbox for the npc.)
- Attach/make this part to the npc.
- Make the wall under a collision group that only the player can collide/interact with (PhysicsService | Documentation - Roblox Creator Hub)
The NPC will still be pushed since the “Hitbox” is part of his body.
Anyone know how to resolve this?
No, don’t make the hitbox part of the body.
Just make the hitbox follow where the player goes at all times
Then use collision group to make the npc not collide with the hitbox (while players do)
The player wont be able to push the hitbox since it’s anchored.