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
It's just a simple typo, GetWaypoints() instead of GetWayPoints(). It's useful to check the API when you get that error to see if you typed it incorrectly.