Multiplayer problem. When one player turns a light on/off the other player doesn't see this change

I have a multiplayer problem. When one player turns a light on/off the other player doesn’t see this change.

Looks like you haven’t gone through any sort of Multiplayer Tutorials.
Nothing you show there has anything to do with multiplayer.

You can start by reading this Multiplayer in Blueprints | Unreal Engine Documentation

Thank you GarnerP57

I have changed my code with replicates and multicast.
It works for the host/server player turning the light on and off, the client and host players see the light going on or off. However if the client turns the light on and off the host does not see this.

Is there a way to replicate from the client to the host/server player?

From E (input) you need to make a RunOnServer event on an Actor that the Player already own ( PlayerController or Pawn) and from there you set a OnRep Variable. Then finally in the On Rep function you set the Visibility.

Here is the solution I created. The biggest problem was, I was trying to make the solution in my map blueprint, but replication doesn’t work here for the client. Now I have created it in the third person blueprint. And now it works. The lights go on and off on the client and server, and all players can see it changing.