Synchronization of two clients on dedicated server

You have to unplug it from your “Spawn Actor” and just call “OnServer” which will send the event to the server and execute it there.

If you call a “Run on Server” event it will be replicated to the server and executed there.

You just call the “OnServer” custom event you created from your “OnClicked”

Not all client events will be replicated to the server. That would be ridiculous. You will have to do that.

You should watch some tutorials on this whole matter or read the docs.