NPC Walking funny when it shoot

  1. What do you want to achieve? Keep it simple and clear!

I want to make the npc shoot the orther npc or player without the problem in the title

  1. What is the issue? Include screenshots / videos if possible!

The npc walk funny due to the bulletshell being collidable

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried to modify my script to make a pathfinding modifier everytime bullet shell is pulled form part cache

				local bullet_shell = bulletshellcache:GetPart()
				bullet_shell.CFrame = mygun.CFrame + (mygun.CFrame * CFrame.Angles(0,math.rad(90),0)).LookVector * 0.05
				bullet_shell.Anchored = false
				local pfm = Instance.new("PathfindingModifier",bullet_shell)
				pfm.PassThrough = true

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

The path finding is form a module called “SimplePath”

1 Like

You can use collision groups to allow the bullet shells and the NPC’s to not collide with each other while not colliding with anything else. Setup collision 2 groups. One for bullet shells, and another for NPC’s/players and the tools that they are holding.

I think re-calculating the walking path for every bullet is going to cause a lot of headaches or not work as intended. I’m not sure if this is still true, but path finding used to only consider objects/obstacles of a minimum size, and I’m guessing the bullets are a lot smaller than that.

2 Likes

i did what you said but it somehow still doesnt work

Ok, did you test to see if the collisions groups are working properly? And did you stop re-calculating the path every time a bullet is fired?

1 Like

collisions group works. but i didnt stop recalculating the path maybe thats the reason why

1 Like