Pathfinding being weird

I have a CollisionGroup called “Door” and the killer has one for all their parts which makes them collide with pratically nothing. The HumanoidRootPart for them is also Door, that CollisionGroup can’t collide with the other one and it isn’t working. I tried adding costs and it also doesn’t work, I don’t know what the problem is. I don’t want to use pathfindingmodifiers because it just becomes a big mess. Any solutions?
Snippet:
local function CreatePath(target : Vector3)
local Path : Path = PathfindingService:CreatePath(
{
AgentCanJump = true,
WaypointSpacing = 5,
AgentRadius = 3,
Costs = {
Wood = 0;
DangerZone = 0
}
}
)
Path:ComputeAsync(script.Parent.HumanoidRootPart.Position, target)
return Path
end

You have to use PathfindingModifiers, as that’s what they’re for.

How would the service know otherwise that the part with CanCollide enabled will not obstruct the path?

Is there a way to use pathfindingmodifiers while hiding them? I want to organize them somewhere other than workspace.

You could try, but I doubt it’ll work outside the workspace.

If you want it the modifier parts to be server-side only, the server’s CurrentCamera should work.

1 Like

How would the CurrentCamera work with that? And yeah, making it serversided only would be a good route too. Would I put the modifiers in the camera?

Yes, the server’s camera isn’t visible to clients, so anything parented to it won’t be replicated.

Yeah I tested that, but my problem is I believe the modifiers have to be parented to the part affected or it is set via scripts.

Parts with modifiers change the navmesh.

Pathfinding modifiers can be used to represent space that has a higher or lower cost to be traversed. When added as a child to a Part, it takes that Part’s volume to annotate areas of the navmesh that are inside and on top of it.

So would I parent it to the part I want modified then put it back into camera? I have never used pathfindingmodifiers.

You can use a single part that represents the volume of the door, add a modifier to it, and parent it to the camera.

2 Likes

So basically duplicate the door into camera but with a pathfindingmodifier? I’ll try that out.

That actually worked! I’m surprised it did. Thank you so much!

1 Like