“But I warn you- unless your righteousness is better than the righteousness of the teachers of religious law and the Pharisees, you will never enter the Kingdom of heaven!”
They were trying to make themselves righteous. Jesus came to be our righteousness. Within ourselves we can't be righteous enough, we have to totally rely on Jesus. He is the only way to enter the Kingdom of Heaven.