How to get child index from an array of weapon.bullets from game.physics.arcade.overlap?

I have multiple weapons firing and thus many weapon.bullets overlapping the enemy target, my problem is that i can’t get the child index of the overlapped weapon.bullets?

here the array of all the weapon.bullets is called projectiles…

game.physics.arcade.overlap(projectiles, enemy, hit, null, this);

then on the function hit the findindex operation freezes the game:

function hit (bullets, enemy){

var index = projectiles.indexof(bullets);

Open the console and look for errors.

If you really need some kind of index, I wouldn’t do it that way. Instead loop through the bullets when they’re created and assign = i or something.