NPCs walk into each other and get stuck

Hello, I want NPCs to move around the map to different points. I got that to work but now they run into each other and get stuck. I don’t know if it’s a problem with the pathfinding, the collisions, I really don’t know.
I have tried countless ways to fix this. Some include pathfinding modifiers, continuously recalculating the path if the NPCs are too close, settings can collide false on every base part of the NPCs(upper and lower torso can collide kept on turning true), etc.
Here is how it looks like: Video
Pathfinding Script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

local WalkSound = ReplicatedStorage:WaitForChild("LocalSounds")
local IdlePathEvent = ReplicatedStorage:WaitForChild("IdlePath")
IdlePathEvent.Event:Connect(function(NPC) 
	NPC.Humanoid.WalkSpeed = 8
	NPC.HumanoidRootPart.Anchored = false
	for _, part in pairs(NPC:GetDescendants()) do
		if part:IsA("BasePart") and part:CanSetNetworkOwnership() then
			part:SetNetworkOwner(nil)
		end
	end
	


	
	local PathFindingService = game:GetService("PathfindingService")

	local human = NPC:WaitForChild("Humanoid")
	local torso = NPC:WaitForChild("UpperTorso")
	torso.Anchored = false

	

	local WalkStatus = true
	
	local walkAnimationTrack = human:LoadAnimation(NPC.WalkAnimation)

	
	if walkAnimationTrack.Length ~= 0 then
		walkAnimationTrack:Play()
		walkAnimationTrack:AdjustSpeed(3/5)
		walkAnimationTrack.Looped = true

	end
	


		
		
		local PathfindingService = game:GetService("PathfindingService")
		local RunService = game:GetService('RunService')


		local Humanoid = NPC.Humanoid
		 
		local room = NPC.Room.Value
		
		local points = game.Workspace.Map[room].IdlePoints:GetChildren()
		
		local Destination = nil
		local choosenIndex = math.random(1,4)
		
		for i,v in pairs(points) do
			
			if i == choosenIndex then
				Destination = v
			end
		end
		
	local reached = false
	
	while NPC.Binded.Value == false do
		local Path = PathFindingService:CreatePath({AgentHeight = 7, AgentRadius = 5, AgentCanJump = false, WaypointSpacing = 1})
	
		
		
		local success, errorMessage = pcall(function()
			Path:ComputeAsync(torso.Position, Destination.Position) --second term, destination
		end)
		
		if success and Path.Status == Enum.PathStatus.Success then
			
			local activeCoroutine = nil
			local follow=true
			local update
			local followPath
			-- Loop update
			coroutine.wrap(function()
				while (follow) and NPC.Binded.Value == false and reached == false do
					wait(1/3)
					local distace = (torso.Position - Destination.Position).Magnitude
					if distace < 7 then
						reached = true
					end
					update()
				end
			end)()


			function update()
				Path:ComputeAsync(torso.Position, Destination.Position)
			
				local Waypoints = Path:GetWaypoints()
				table.remove(Waypoints, 1)  -- First waypoint seems to always be origin

			coroutine.wrap(followPath)(Waypoints) -- Follow new path
			
			end

		function followPath(waypoints)
			
				activeCoroutine = coroutine.running()
				for _, point in ipairs(waypoints) do
				if activeCoroutine~=coroutine.running() then
					
						return end  -- No longer active path
					if NPC.Binded.Value == false then
						Humanoid:MoveTo(point.Position)
						Humanoid.MoveToFinished:Wait()
					end
				end
			end

			if reached == true then
				IdlePathEvent:Fire(NPC)
				break
			end
		
		

			wait()
		else 
			
		end
		wait()
	end
	wait()
	
end)
wait()
























You can use collision groups to stop them from colliding.

How? Their collision is already set to true. If I set it to false then they will go through each other and that will solve the problem but it will look unrealistic.

You might be able to make an invisible part, non-collidable, and use a pathfinding modifier.

Example:
For each NPC, do this.

  1. Use any existing pathfinding modifiers.
  2. Pathfind.
  3. Create a part or parts that goes across the path and use modifiers.
  4. Move through the path
  5. Remove part(s).