I suggest you look at that scripture again, to remind yourself of what Christ Jesus really said, not how you choose to twist it.
Matthew 25:30-50 31
When the Son of Man comes in his glory, and all the angels with him, he will sit on his throne in heavenly glory. 32All the nations will be gathered before him, and he will separate the people one from another as a shepherd separates the sheep from the goats. 33He will put the sheep on his right and the goats on his left. 34Then the King will say to those on his right, Come, you who are blessed by my Father; take your inheritance, the kingdom prepared for you since the creation of the world. 35For I was hungry and you gave me something to eat, I was thirsty and you gave me something to drink, I was a stranger and you invited me in, 36I needed clothes and you clothed me, I was sick and you looked after me, I was in prison and you came to visit me. 37Then the righteous will answer him, Lord, when did we see you hungry and feed you, or thirsty and give you something to drink? 38When did we see you a stranger and invite you in, or needing clothes and clothe you? 39When did we see you sick or in prison and go to visit you? 40The King will reply, I tell you the truth, whatever you did for one of the least of these brothers of mine, you did for me. 41Then he will say to those on his left, Depart from me, you who are cursed, into the eternal fire prepared for the devil and his angels. 42For I was hungry and you gave me nothing to eat, I was thirsty and you gave me nothing to drink, 43I was a stranger and you did not invite me in, I needed clothes and you did not clothe me, I was sick and in prison and you did not look after me. 44They also will answer, Lord, when did we see you hungry or thirsty or a stranger or needing clothes or sick or in prison, and did not help you? 45He will reply, I tell you the truth, whatever you did not do for one of the least of these, you did not do for me. 46Then they will go away to eternal punishment, but the righteous to eternal life.
Where did Chrst sy their faith would save them? Let's be literal here. It was what they did or didn't do that made the difference.
Here’s another one:
James 2:14-26
14 What does it profit, my brethren, if someone says he has faith but does not have works? Can faith save him? 15 If a brother or sister is naked and destitute of daily food, 16 and one of you says to them, Depart in peace, be warmed and filled, but you do not give them the things which are needed for the body, what does it profit? 17 Thus also faith by itself, if it does not have works, is dead.
18 But someone will say, You have faith, and I have works. Show me your faith without your[a] works, and I will show you my faith by my[b] works. 19 You believe that there is one God. You do well. Even the demons believeand tremble! 20 But do you want to know, O foolish man, that faith without works is dead?[c] 21 Was not Abraham our father justified by works when he offered Isaac his son on the altar? 22 Do you see that faith was working together with his works, and by works faith was made perfect? 23 And the Scripture was fulfilled which says, Abraham believed God, and it was accounted to him for righteousness.[d]And he was called the friend of God. 24 You see then that a man is justified by works, and not by faith only.
25 Likewise, was not Rahab the harlot also justified by works when she received the messengers and sent them out another way?
26 For as the body without the spirit is dead, so faith without works is dead also.
If I thought that you were honestly desiring to understand this teaching of Jesus, I would explain it to you. But I am aware that it has been done on this very forum numerous times yet the same twisting gets done at every opportunity. Just as a reminder, in hopes it will shake loose those previous explanations, let me just say the following:
1. Jesus was speaking about the Great White Throne Judgment.
2. This is the time at the end of the thousand year reign of Christ on the earth after the end of the tribulation.
3. Those being judged will be the ones who were either born during the millennium or all those who died in unbelief held in Hades (the temporary holding place before the final Hell is created).
4. All who previously died in belief or who were caught up to be with Christ at the Rapture have already been judged at the Judgment Seat of Christ. We will not be judged to determine Heaven of Hell, because Jesus bore our judgment and through his sacrifice, we have atonement for our sins. We will not be judged for sin, because he has removed them from us as far as the east is from the west. We receive rewards or loss of rewards based upon how we have allowed the grace of God to work through our lives.
5. At the final judgment, all the unbelievers face the judge of all and they are judged out of the Book of Life, those whose names have been blotted out are cast into the lake of fire. The gathering of the "sheep and goats" is speaking of those who come out of the millennium. What is important to note here is that they already are either sheep or goats. This time of judgment doesn't turn them into one or the other. The sheep are the believers the goats the unbelievers.
6. Notice also, that the ones judged question Jesus about, "When did we see you...?" They were not doing good works such as unto the "least of these", in order to be among the sheep. They did them BECAUSE they were sheep. Ditto for the goats.
So, whenever we read teachings such as these that seem to contradict other passages, we should remember to look at the context such as to whom he is speaking, where, when, what. Jesus clearly said those who believe on him HAVE eternal life. Why would he turn around and contradict his own words? Answer - he doesn't.