• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!

gun help


ok so i have multiple guns that i would like to respawn every once and a while. My main point is how would i make it so when i collide with one anything the player is holding will get destroyed and will keep the new one.
I can provide code if needed. Thanks in advanced.


Store the ID of the active gun that the player is using in the player instance. When the player picks up a new gun, then you can easily destroy the old one by referencing that variable holding its ID.


Then assign the new gun's ID to the player.