There is a time in a child's life where he/she has to be taught how to put on shoes. Sometimes it can get a little confusing which shoe belongs on which foot, nevertheless, with practice and determination that little toddler will get it! But, let's be honest though, we know that there is going to be that phase that he puts the wrong shoe on the wrong foot. Look at his face, look at the sheer satisfaction of putting the shoe on - however, you know the truth.
Our relationship with God can at times be just like this child. Just like the shoes, we can view God and people in a wrong way. Whenever you view anything in a way that is outside of the word of God, you become self-righteous. Why? Because you will always be pleased with your point of view - Every way of a man is right in his own eyes: but the LORD pondereth the hearts. (Prov 21:2).
Whether your perspective is based on ignorance or rebellion, once you go beyond God's word to create your own righteousness, you have thus denied God; because God is His word!
Don't be as the child who joys in wearing the wrong shoe, but instead be as the one who hungers and thirsts after God, seeking to have his feet shod with the truth of the gospel, that you may run a race to the end. Do not create your own righteousness - only the truth can set you free