Why is the NPC not using the PathFindingModifier logic and going through the Green and Blue Part? If I delete the Blue Part, the NPC goes fine back and forth to the two waypoints.
I have an NPC with Pathfinding and two waypoints. Where creating a Part name ‘NPC go through’ (green part), Anchoring it, setting CanCollide to false, adding a PathFindingModifier, with PassThrough = true. I am using the PathFindingModifer so that it should ignore the Door (Blue Part) part and walk through it, because the Green Part has the PathFindingModifier, Anchored, with Collision off. (AND the PathFindingModifer under it)
I also made sure to scale the Green part bigger then the Blue part.
I am following this Roblox document, which says this should have the NPC ignore the Door and go through it.
delete the region and just put the PathfindingModifier inside the door itself (I recommend this one to reduce part count, but ONLY If the door is 1 single part)
Not sure why that fixes it. I’ve been working with the pathfinding for a very long time. That specific tutorial page you linked is very old. It may be a new roblox update or a bug. Either way, seems like you can get around the issue by doing the step above.
This is pretty cool. Didn’t know pathfinding could even do objects. But I do know it can do part “textures” like sand or slate … from the terrain. However you can just make a flat part and place it on the floor with transparency set set the cost on that to super high and they will not ever try to walk over it.
Hi,
On your two examples, what are the property settings for the first two parts, and PathfindingModifier , and the second example the part and pfm… spefically for the parts the cancollide value?
Thanks
And I think I already tried 1, and it did not work… (the green part ((with the pfm) was bigger though, not exactly as small as the door… I thought bigger would have been better)
The reason for this is because Enum.RaycastFilterType.Blacklist & Whitelist are deprecated. Use Exclude in place of Blacklist & Include instead of Whitelist.
As you can see, on the green one, there’s arrows going from one side to the other. This means it’s passthrough enabled. The blue one, however, looks exactly like the walls. That means it doesn’t allow passthrough.
So even if it can go through the green one, it most certainly won’t get through the blue one. And as the blue one is inside the green one, that means it also won’t be able to (fully) get through the green one. The solution is to either add the pathfindingmodifier to the blue part too, or to just make the green part the door. In a real game, you’d probably just want to make the door-mesh have the pathfindingmodifier.
Also, the fact that the green part is non-collide probably means the pathfinder ignores it, because it wouldn’t be able to use it as a surface to walk over, and it also wouldn’t consider it an obstacle.
As for the deprecated terms of ‘whitelist’ and ‘blacklist’, Roblox has wokified luau, and according to the law of the blue haired these terms are unacceptable now. So they use exclude/include.