I have weapons actors in my game that could be picked up by pressing E when the character collides with their Collision box
however there is a filter ( branch ) inside the weapon actor blueprint that chicks if the weapon exist inside the weapons array in the third person blueprint, and only if the weapon does not exist, it add the weapon to the array
however that branch is not working and when I click the E button two times, the first time it picks the weapon from the floor adding it to the weapon array and the right hand, then when I click it second time it is picking the weapon from the right hand adding it again to the weapon array, therefore duplicating the same weapon in the inventory
this is causing a lot of issues in my game logic how can I solve this problem