Call function in script that is on mutiple objects

I am attempting to call an animation state for walls to disintegrate once a level is completed. This is the code that is held on the walls themselves:

public class Wallblink : MonoBehaviour
{
    public static Wallblink instance;
    public Animator wallAnim;

    private void Awake()
    {
        instance = this;
    }

    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.M))
        {
            PlayWallAnim();
        }
    }

    public void PlayWallAnim()
    {
        wallAnim.Play("WallBlink");
    }
}

I have the test keycode in the update function and when the key is pressed it works as it should and how I want it too. If I try to call the function from another script it is as if it was never called. Why is this? If I reference the script through instance it does not work, if I grab the script in runtime it does not work. This is what I currently have and it still does not work:

 var walls = GameObject.FindGameObjectsWithTag("Wall");
           
            foreach (var wall in walls)
            {
                wall.GetComponent<Wallblink>().PlayWallAnim();
            }

Does anyone have any ideas on how I could go about this or fix an issue I have here? Yes, the walls have the tag Wall.

All of those things are possible and all of them work when done correctly.

“Done correctly” means more than just code, as obviously what is in the scene is important too.

Dragging a reference is always best, using target.GetComponent<T>() is second-best. Be sure you are asking on the proper target when you do.

Generally,

Referencing variables, fields, methods (anything non-static) in other script instances:

https://discussions.unity.com/t/833085/2

https://discussions.unity.com/t/839310

REMEMBER: it isn’t always the best idea for everything to access everything else all over the place. For instance, it is BAD for the player to reach into an enemy and reduce his health.

Instead there should be a function you call on the enemy to reduce his health. All the same rules apply for the above steps: the function must be public AND you need a reference to the class instance.

That way the enemy (and only the enemy) has code to reduce his health and simultaneously do anything else, such as kill him or make him reel from the impact, and all that code is centralized in one place.