Weapon pickup/drop C# need help

I attached InteractWeapon to The camera And the pick up To the object (the weapon) And the drop also to the player

  1. The drop script doesn’t Show the object wenn it’s spawned
  2. I want a script for switching between about 3 weapons with the scroll wheel I tried so mutch tutorials and try so many script but it just won’t work for me :frowning:

All help wil be appreciated!

2528630–175388–InteractWeapon.cs (577 Bytes)
2528630–175389–PickUp.cs (322 Bytes)
2528630–175390–DropItem.cs (371 Bytes)

MouseScrollWheel is just an input “axis” in the same sense that “Horizontal” and “Vertical” are. So

if(Input.GetAxis("MouseScrollWheel") > 0) { /* scroll up stuff */}
if(Input.GetAxis("MouseScrollWheel") < 0) { /* scroll down stuff */}

(might be the other way around, but you get the idea.)

As for the scripts… erm… huh :eyes:
I think you need to look up some basic “inventory” tutorials, a simple list or array and the ways in which you can have the “currentItem” etc.