So I have a shield attached to the player, so the player is the parent and the shield is the child. In my shooting script, i set it so whenever i shoot a tagged gameobject “Player”, it would do damage to it. The shield doesnt have the tag ” Player” but the player it self does. Whenever i have my shield up, and i try to shoot, i somehow do damage to myself. But the thing is that my shield doesnt have the tag “Player”, so how am I taking damage?
I was thinking that if a raycast hit a child, it technically means it hits the parent, maybe i’m wrong, but if this is the case, how do i fix this? How do i make it so the player wont take damage when I shoot my own shield? And I do need the shield to be attached to the player.