multicast problem

why when I click on the cube with player 1 server it turns the cube well and player 2 client sees it turn well, but when I click with player 2 client on the cube nothing happens

well it depends on a few factors. Is this code in the cube or the player? If its on the cube, then the caller must have authority, so it has to have ownership of the cube.

Also make sure that the cubes actor is set to allow replication.

If this code exists in a component, make sure to set the component to allow replication as well.

the code and the cube the cube and replicate.how to have authority

if the code is on the cube, theres two different ways I suggest going about it

One way is to replicate the click from the player’s blueprint.

Another is when the player clicks the cube, we call “SetOwner” on the cube. It needs to be done on the server, but I personally like to do it locally as well

can you tell me how to do it I would like to learn how to do this