Good point about where a person's heart is, Jesus knew the rich guy wasn't going to sell everything thus why He ask of it of the man. Surely it was a example, for this one below is also quite similier yet different outcome.
Luke 19
1And Jesus entered and passed through Jericho. 2And, behold, there was a man named Zacchaeus, which was the chief among the publicans, and he was rich. 3And he sought to see Jesus who he was; and could not for the press, because he was little of stature. 4And he ran before, and climbed up into a sycomore tree to see him: for he was to pass that way. 5And when Jesus came to the place, he looked up, and saw him, and said unto him, Zacchaeus, make haste, and come down; for to day I must abide at thy house. 6And he made haste, and came down, and received him joyfully. 7And when they saw it, they all murmured, saying, That he was gone to be guest with a man that is a sinner.
8And Zacchaeus stood, and said unto the Lord; Behold, Lord, the half of my goods I give to the poor; and if I have taken any thing from any man by false accusation, I restore him fourfold.
9And Jesus said unto him, This day is salvation come to this house, forsomuch as he also is a son of Abraham. 10For the Son of man is come to seek and to save that which was lost.