Pathfinding Bug?

I was making a pathfinding system, but it only works when the block height is 1 , if i increase the height it calculate the path but doenst follow it, what it can be?




local PathfindingService = game:GetService("PathfindingService")
local npc = script.Parent
local goal = game.Workspace.Gate1.GateMain

local params = {AgentRadius = 12, AgentHeight = 10, AgentCanJump = false}
local path = PathfindingService:CreatePath(params)

function followpoint(p)
	local StartingDistance = (p.Position-npc.Position).magnitude
	local tempo = (p.Position-npc.Position).Unit
	npc.BodyVelocity.Velocity = tempo*5--Vector3.new(Direction.X * 6,0,Direction.Z* 6)--(p.Position-npc.Position).Unit
	print(npc.BodyVelocity.Velocity)
	wait(StartingDistance/5)
	print('calculatingNextPos')
        while true do
		wait()
		if (script.Parent.Position - p.Position).magnitude < .7 then
			break
		end
	end
end

function showPath(points)
	for _, waypoint in pairs(points) do
		local part = Instance.new("Part")
		part.Shape = "Ball"
		part.Material = "Neon"
		part.Size = Vector3.new(0.6, 0.6, 0.6)
		part.Position = waypoint.Position

		if waypoint.Action == Enum.PathWaypointAction.Jump then
			part.Color = Color3.new(1,0,0)
		end

		part.Anchored = true
		part.CanCollide = false
		part.Parent = game.Workspace
	end			
end

function calculatepath()
	if npc.Parent:FindFirstChildOfClass("Humanoid")then
		path:ComputeAsync(npc.Position, goal.Position)
	end
	

	local waypoints = path:GetWaypoints()
	showPath(waypoints)
	for _, p in pairs(waypoints) do
		followpoint(p)
	end
end


calculatepath()

Might be because the part is too heavy. Multiplying the BodyVelocity.Velocity by the mass might fix that.

I setted to massless and still not working, idk if is that

If the height of the destination is higher than the npc, then it will not follow the calculated path.

How should i fix that? i’ already found someone talking about this on devforum, but idk how implement

Simply make the destination smaller in height/scale than the npc.

Ok, it doesnt make sense, check video again, the height is smaller than gate part, only work when i set player height to 1

I don’t understand. Then just set it to 1 and problem solved?