Actions only run on the client that runs in the editor window

hello there, i’m making a fps game, where i can buy weapons, but as stupid as it sounds i can only actually buy a weapon when the player who buys is the one running in the unreal engine editor screen, does anyone know why this happens?
The code to buy a rifle and spawn it is this.


my editor is this way