The pathfindinservice does nothing

I made used the Roblox’s pathfinding Service and it does nothing not even a error. I tried multiple tutorials and even copy pasted code and still it does not work.

local PathfindingService = game:GetService("PathfindingService")

local Humanoid = script.Parent.Humanoid
local Root = script.Parent:FindFirstChild("HumanoidRootPart")
local goal = game.Workspace.PointA.Position

local path = PathfindingService:CreatePath()

path:ComputeAsync(Root.Position, goal)

local waypoints = path:GetWaypoints()

for i, waypoint in ipairs(waypoints) do
	Humanoid:MoveTo(waypoint.Position)

	if waypoint.Action == Enum.PathWaypointAction.Jump then
		Humanoid.Jump = true
	end

	Humanoid.MoveToFinished:Wait()
end

image

LocalScripts dont work in workspace, only in places like StarterGui, StarterCharacterScripts and StarterPlayerScripts.

Okay I will try that. Thanks for letting me know

Still didn’t work maybe it’s because I bring the character from serverstorage?

Try using a regular script.

Already did image

Use pairs instead of ipairs, I believe they work differently.

Stil does not work. I will try figure something out

Does it move at all? Maybe the humanoidrootpart is anchored

use prints to debug. see what is running and what is not.