He can buy a rifle from a FFL in Texas, but not a private seller. The FFL will have to follow all the laws of both States.Being in Illinois, I wonder if you are even allowed by law to purchase a firearm from Texas. Something about FOID cards etc. etc. Serious question.
By federal law, you can purchase a long gun out-of-state in any state, but only from an FFL. The FFL must comply with both his state's laws and Illinois laws. That means the FFL should check your FOID for validity and enforce Illinois' waiting period. (Technically that's on him if he doesn't).
Some states have laws about which states' residents can buy firearms in that state. The Illinois FOID Act restricts Illinois residents to buying long guns in Iowa, Missouri, Indiana, Wisconsin, and Kentucky. If you try to buy a gun in a state that doesn't prohibit sales to Illinois residents, but it isn't one of those in the FOID Act, supposedly the FFL should deny the sale. (Prosecuting either you or the FFL could be a challenge, especially if you don't bring the firearm back into Illinois.)
You don't have to have the long gun shipped to an Illinois FFL. Of course, FFLs frequently enforce conditions that don't exist in any law