Get the weapon inventory variable from the inventory pin then connect that to the target array like shown in the image below, location at the top of the screenshot.