Pathfindingmodifier passthrough doesnt seem to work?

I’ve made these little guys that pathfind to a certain point, they cannot collide with each other and have a pathfinding modifier with pass through set to true, but they seem to detect each other and make weird movements. I do not want this to happen and I want them to take the same clear path.



Can you send your pathfinding code?

yes, here it is (my little guys are not humanoids btw)

it might be because ur not computing a new path everytime. When the modifiers move, the old path doesn’t account for the change.

I see, this could be the issue. I will try this later and see if it works.

sorry for the late reply, but I tried this and it didn’t seem to work, also they just have a spasm

function Fungmin:Pathfind(goal:BasePart)

	self.alignPosition.Enabled = true
	self.lookAtAlign.Enabled = true
	self.target = goal
	
	local goalReached = false
	local currentWaypoint

	RunService.Heartbeat:Connect(function()
		if currentWaypoint then
			self.lookAtAlign.CFrame = CFrame.new(currentWaypoint.Position.X, self.positionAttachment.WorldPosition.Y, currentWaypoint.Position.Z)
			self.alignPosition.Position = Vector3.new(currentWaypoint.Position.X, self.positionAttachment.WorldPosition.Y, currentWaypoint.Position.Z)
		end
	end)

	-- The main pathfinding loop
	self.pathingTask = task.spawn(function()

		while self.target do
			local path = PathfindingService:CreatePath({
				AgentRadius = 2,
				AgentHeight = 1,
				AgentCanJump = false,
				PathSettings = {
					SupportPartialPath = true
				}
			})

			self.alignPosition.Enabled = true
			self.lookAtAlign.Enabled = true

			local success, errorMessage = pcall(function()
				path:ComputeAsync(self.base.Position, self.target.Position)
			end)
			
			local doBreak = false

			if success then
				task.spawn(function()
					for i, waypoint in pairs(path:GetWaypoints()) do
						

						currentWaypoint = waypoint
						repeat  
							task.wait()
							if not self.target or doBreak then 
								break
							end  

							local targetPosition = self.target.Position
							local currentPosition = self.positionAttachment.WorldPosition



						until (self.positionAttachment.WorldPosition - currentWaypoint.Position).Magnitude <= 3
					end
				end)
				
			end
			
			task.wait(0.1) 
		end

		self.alignPosition.Enabled = false
		self.lookAtAlign.Enabled = false
		currentWaypoint = nil
		
		return
	end)
	
	while task.wait(0.1) do
		if goalReached then
			return true
		elseif not self.target then
			return false
		end
	end
end

video