GetAllActors of class returns an Array of those actors, so to do something on all of them you have to foreach loop through them and do it on the Array Element (that will be each actor in the array).
Another option is to use Event Dispatchers and register each one to listen for that event. Then you don’t have to loop over an array or even GetAllActors, Totally different approach so the first one I mentioned is closer to what you already have.