Hello everyone,
I’ve got a really simple question, that I wasn’t able to solve though: Is there a way to get a script component from an object’s parent?
I’ll explain better the situation. Each enemy in my game has a trigger collider box as a children with the tag Damage, if the character’s sword colliders with that trigger box, the enemy Dies, so when the sword touches the trigger collider tagged damage, I want to access the Die() method from his parent, the enemy, how can I solve this?
Thanks for asking this. It was annoying because I was trying to get the component from the game object and it wasn't working. I didn't know you could do it this way.
– The-BOOM