I'm doing a PathFinding script but i dont know why i'm keep getting that error "GetWayPoints is not a valid member of Path" So if u knwo how to fix that Help me :)
Code :
local pathService = game:GetService("PathfindingService")
local finish = workspace.ici
function followPath(path)
local points = path:GetWayPoints()
for index, point in pairs(points) do
if point.Action == Enum.PathWaypointAction.Walk then
script.Parent.Humanoid:MoveTo(point.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
end
if point.Action == Enum.PathWaypointAction.Jump then
script.Parent.Humanoid.Jump = true
end
end
end
while wait() do
local getPath = pathService:ComputeRawPathAsync(script.Parent.HumanoidRootPart.Position, finish.Position, 500)
followPath(getPath)
end

1 comment
thx