One way to do it is having a different object or object animation frame for all weapons (or weapon + player arms holding the weapon or whatever makes most visual sense in your case) and pin that object to the player. Another way is to animate the whole player character with the different weapons.
Or if you mean how to change animations when picking up weapon, than just set up a condition "player is overlapping weapon => change player animation (insert animation name).
You could upload you project here if you want more specific help..