Setting up line tracing with multiple enemies?

Thanks for the suggestion

My issue is that my code for the weapon (as shown in the images) is only able to detect and damage the Zombie AI enemy. I have another enemy I want to implement and be detected by the ray traces but I am not sure how to implement this. Hope that helps