How do I stop a child from taking the parent's tag?
I have an object attached to the player that is 2.4 units ahead of him, and only appears while he is running. The player's tag is 'Player', while the object's tag is 'Melee'. I have a script that tells all objects with the tag 'Enemy' to harm 'Player' tags, but get harmed by 'Melee' tags. Anyways, because my object is a child, it uses the parent's tag, 'Player'. So, rather than harming the enemy, it is harmed by the enemy. And that's not what I want. Let me know if you want my scripts, they're kinda long..
You're probably checking the parent by mistake. OnCollision let's you check the parent or the child. The docs don't explain it, but try printing the names and you'll see which is which.
Answer by Paul-Bones · Apr 29, 2020 at 09:36 AM
Solved, by adding a kinematic rigidbody to the child!
The best way to say "thanks" is to upvote the answer (w/o leaving a comment).