FPS Weapon pickup

Hi guys. How’s it going? :slight_smile:

How can we script a weapon pickup wherein when we pickup the weapon, your weapon will change and the object will replace your previous weapon? also your UI (Crossair, weapon display, etc etc)


Swapping weapons can be done with a bone parented empty. If you watch the Project FPS tutorial series you will learn about doing this.
The basics:

  1. find some way to trigger ‘picking up’
  2. add the picked up weapon to a list of weapons
  3. lower the players arms out of view, along with the equipped gun.
  4. remove the equipped gun, spawn in and parent the picked up weapon.
  5. move the players arms back into view with the new weapon.
  6. You may also have to change properties such as ammo, fire rate, reload, recoil and a whole bunch of other stuff that is weapon relevant.