you have to be a resident of the state you purchase a handgun in, or have it shipped to a dealer in your home state for transfer. Unless you are military, but you still have to abide by your home states laws when returning. Long guns are another story, you can buy a long gun in another state to take home, but it changes from state to state. Wally world used to have a map on the wall behind the gun counter that showed which states if you are a resident of you could buy a long gun. CWP has to be in your home state, then you can get a non resident in another state. If you have dual residency, and CWP, you might, and I stress the might, be able to purchase a hand gun in another state to keep at that residency. It will vary from state to state. You will need to check with the selling dealer. For carry jurisdictions and laws, check with
https://www.usacarry.com/ but always double check with law enforcement in the are you are traveling thru.