The Destiny Knot will allow you inherit 5 IV's from the parents, so you must also have a perfect Lucario as well as a perfect Ditto to increase your chances of have 5 Perfect Ivs to pass down. otherwise it will increase the chance of taking the imperfect stats of the imperfect parent.