Actually.. it was an attempt to "achieve" righteousness.
But, the Law was given to show man that he is not righteous.
Therefore no one will be declared righteous in God’s sight by the works of the law;
rather, through the law we become conscious of our sin." Romans 3:20
.....