Pathfinding script not working

Hello!
I have a pathfinding script:


local NPC = script.Parent
local PathfindingService = game:GetService('PathfindingService')
local HRP = NPC:WaitForChild('HumanoidRootPart')
local Players = game:GetService('Players')
local Humanoid = NPC:WaitForChild('Humanoid')
HRP:SetNetworkOwner(nil)

local function GetPath(Target)

	local Path = PathfindingService:CreatePath()


	Path:ComputeAsync(HRP.Position,Target.HumanoidRootPart.Position)

	return Path
end

local function WalkTo()

	local Target = GetTarget()
	local Path = GetPath(Target)

	if Path.Status == Enum.PathStatus.Success then

		local Waypoints = Path:GetWaypoints()

		for _, Waypoint in pairs(Waypoints) do
			Humanoid:MoveTo(Waypoint.Position)
			Humanoid.MoveToFinished:Wait()
		end

	else
		print('Stuck!')

		Humanoid:MoveTo(HRP.Position - Vector3.new(0,5,0))
		
	end

	
end

while wait() do
	WalkTo()
end

But it doesn’t work correctly.
Here is my map:

The npc just walks off the grass, and tries to get to me, but it just touched the green. Why doesn’t it go across the plank?!

To study it’s movement put this inside of the for loop to move

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
part.Anchored = true
part.CanCollide = false
part.Color = Color3.fromRGB(255,0,0)
part.Parent = game.Workspace

Isn’t the plank too small?

No, I tested it with an npc with the wiki, and it crossed the plank.

If it just jump out of the plank, means he finds a way to get to you that way, add the dot marking system