function Pathfinder.CreatePath(A,o)if not o then return false end local P=PathfindingService:FindPathAsync(A.RootPart.Position,o)if P.Status==Enum.PathStatus.Success then if DEBUG then A:DrawPath(P)end return true,P end return false end function Pathfinder.SetCurrentPath(A,o)A.CurrentPath=o end
--[[			
	@param 	BasePart 	TargetPart		The part for which we want to create a path to.
	@return Boolean		IsValidPath		Returns true if a valid path exists. Returns false otherwise.
	@return Path		Path			Returns a Path object if it is a valid path. Returns nil otherwise.
--]]
function Pathfinder:CreatePath(TargetPosition)
	if not TargetPosition then
		return false
	end

	local Path = PathfindingService:FindPathAsync(self.RootPart.Position, TargetPosition)

	if Path.Status == Enum.PathStatus.Success then
		if DEBUG then
			self:DrawPath(Path)
		end
		return true, Path
	end

	return false
end

function Pathfinder:SetCurrentPath(Path)
	self.CurrentPath = Path
end
