minipill
EDIT: I didn't refresh the screen so I didn't see the other replies while I was playing around...
what is happening is not quite what you think.
when a player collides with a weapon, you destroy the weapon and spawn a new one on that player.
however, when you spawn an object from a family, you get a random member of that family... so you don't know which weapon you will get.
AND spawning a weapon on the player makes the player collide with that weapon, which then causes that weapon to be destroyed and another random one created.
the reason why it looks like both players are getting equipped is that your collision boxes on the weapons are a lot bigger than the actual image, so when you are moving the players, they are both colliding with a weapon, and then both running the endless loop of destroying and creating a new random weapon.
So, what you probably want to do is add an instance variable to the weapon family called "Equipped" and set it to false. Then when a player collides, pin it to the player and set it to equipped so the other player wont pick it up if they cross paths...
https://www.rieperts.com/games/forum/weapon_test.c3p