In Texas, you must be at least 18 years of age to buy a rifle, and at least 21 years of age to buy a handgun from a licensed dealer. Under federal law, it is generally illegal for someone younger than 18 to possess a handgun outside of certain situations such as defending oneself against an intruder or for hunting.