Ability Feedback - How should I set this up

So I want my character’s abilities to trigger animations on separate game objects. What I’ve tried doesn’t work and even if it did, it feels like an awfully clunky way of doing it. Suggestions would be super appreciated <3

What I’ve tried so far is the following (pseudocode):

public GameObject pFeedback;

private Animator pAnimator;

Start () {
pAnimator = pFeedback.GetComponent();

Update ()

The easiest way to do this is to have public Animator variables on your player script, in which you drag and drop the appropriate gameobjects you want to animate.

Then, simply call SetTrigger on these variables as you are doing right now.