Who execute what?

Hi everybody,

I was wondering who (client / server ) execute which blueprint in UE4 ?
In fact, I would like to create a multiplayer game (dedicated server, but for test I use Listen server).

I have a BP for my AI. In this BP I have the node “on component begin overlapped”. In this node I add actors that are overlapping my box collision to an array.
I have a notify state (in my attack montage) and when the state end it calls an event in my AI BP that will apply damage on overlapping player (stored in the array).
It is working well on my server player but not all times on my client players.

The reason why it is not working is because in the “on component begin overlapped” event, sometimes the client execute the script and some other times it is the server. And in the event called by anim notify state, it is always execute by the server. As a conclusion, majority of times the server has nothing in the array (because he never add element in it since he doesn’t execute the “on component begin overlapped”.

What I have tried :

I have added a test “switch has authority” in my event begin overlapped, and connected to “authority” the add to array node (simple node). In remote I connected a custom event that is run on server.
In my head it was supposed to work (but it just in my head because it is not working too)
The reason why it is not working is that we are not able to call the event run on server. This event is never executed (even if we have not the authority).

So, does someone have an idea of why it is not working ?

Thank you very much !