To understand Jesus’ response to the rich young ruler’s you are referring too in your statement let look at he question being asked.
Question: "What must I do to be saved?"
We must consider three things: the background of the rich young ruler, the purpose of his question, and the essence of the gospel of Jesus Christ. The young man had asked Jesus, "Teacher, what good thing must I do to get eternal life?", Matthew 19:16. Jesus responded, "If you want to enter life, keep the commandments" (verse 19). It appears that Jesus is saying that the young man and, by extension, all people must obey the commandments in order to be saved. But is that really what He was saying? Since the essence of the salvation message is that we are saved by grace through faith (Ephesians 2:8–9), why would Jesus offer the rich young ruler an "alternative plan"?
Let explore a bit more, the story of the rich young ruler is found in all three of the Synoptic Gospels, Matthew 19:16–23, Mark 10:17–22, and Luke 18:18–23. The man is described as a ruler, which means he was a prince or magistrate of some sort. Since no Roman ruler would address Jesus as teacher or master, it is assumed that this man was a Jewish ruler in the local synagogue. This man also had great wealth according to Matthew 19:22, and Jesus later used His conversation with this man to teach the detrimental effect money can have on one’s desire for eternal life (verses 23–24). The lesson Jesus draws from this incident concerns money, not salvation by works. Do you understand thus far?
The first thing Jesus says to the man’s greeting, "Good teacher," is to remind him that no one is good except God (Matthew 19:17). Jesus was not denying His own divinity. Rather, Jesus was immediately getting the man to think about what "good" really means since only God is good, then what we normally call human goodness might be something else entirely. This truth comes into play later in the conversation. When the man asked Jesus to specify which commandments he should keep, Jesus recited six of the commandments, including “love your neighbor as yourself” (Matthew 19:19). The man replies, “All these I have kept. . . . What do I still lack?” (verse 20), and that is a key statement. The young man was obviously religious and sincere in his pursuit of righteousness. His problem was that he considered himself to be faultless concerning the Law. And this is the point that Jesus challenges.
Jesus tells the man, “If you want to be perfect, go, sell your possessions and give to the poor, and you will have treasure in heaven. Then come, follow me” (Matthew 19:21). The young man decided that Jesus was asking too much. “He went away sad, because he had great wealth” (verse 22). Rather than obey Jesus’ instructions, he turned his back on the Lord and walked away. The man’s choice undoubtedly saddened Jesus as well, because Jesus loved him (Mark 10:21).
The main point
In telling the young man to keep the commandments, Jesus was not saying that he could be saved by obeying the commandments; rather, Jesus was emphasizing the Law as God’s perfect standard. If you can keep the Law perfectly, then you can escape sin’s penalty but that’s a big if. When the man responded that he met the Law’s standard, Jesus simply touched on one issue that proved the man did not measure up to God’s holiness. The man was not willing to follow the Lord, if that meant he must give up his wealth. Thus, the man was breaking the two greatest commands; he did not love his neighbor as himself, and he did not love the Lord with all his heart. He loved himself (and his money) more. Far from keeping “all” the commandments, as he had claimed, the man was a sinner like everyone else. The Law proved it.
If the man had loved God and other people more than he did his property, he would have been willing to give up his wealth to the service of God and man. But that was not the case. He had made an idol of his wealth, and he loved it more than God. With surgical precision, Jesus exposes the greed in the man’s heart greed the man did not even suspect he had. Jesus’ statement that only God is good (Matthew 19:18) is proved in the young man’s response to Jesus’ command.
In His conversation with the rich young ruler, Christ did not teach that we are saved by the works of the Law. The Bible’s message is that salvation is by grace through faith (Romans 3:20, 28; 4:6; Galatians 2:16; Ephesians 2:9; 2 Timothy 1:9). Rather, Jesus used the man’s love of money to show how the man fell short of God’s holy standard as do we all. The rich young ruler needed the Savior, and so do we.
Let us understand what is it we are reading and not just read to make hieratical remarks because at the end of those remarks you might end up looking foolish due to a lack understand.