It would be better to screen shot the two functions. I can’t see to what extent you modified the code.
You seem to be trying to access an array element that most likely already been destroyed or is being destroyed.
Here is a video of the working version. I only added one gun class but made it add random variations internally. It would work with many classes too.
I just extracted the destroy loop function to an event to call it before the next generation of random weapons to clear the spawn points.