Server not replicating to clients

Hi all , thank you first ,

I have a problem : the server is not replicating the function to all users

When the fire button is pressed this function is called : “Fire Button Pressed” ( picture 2 )

and then it calls a ServerFireEvent function :

and then the ServerFireEvent calls A multi cast event , because :

the actor is owned by a client so the multicast will execute the function on the server , and the ServerFireEvent will call the function on all clients because it’s owned by a client .
Fire function : 2 — ImgBB

But my problem is that the server is not replicating the fire action to clients , it only execute on the server and the owner of the action

where is the problem please ?
thank you

There is no guarantee that “Equipped weapon” or the “Character” variable is replicated by the time the function is called. A better way is to send those variables with the Multicast RPC to ensure they arrive when the function is called on the Client.

1 Like

As the previous answer:
Check the object reference if they are valid and probably whats inside.

First, I would like to ask you something: Does your function work when a client sends an RPC to the server?

Multicast RPCs are made to execute on the server locally, as well as on all the connected clients. You can take a look at the official documentation to see what’s missing, but it is also possible that your “equipped weapons” or “Characters” aren’t being replicated because they don’t get properly spawned by the time you call your RPC.

Here’s the documentation: RPCs | Unreal Engine 4.27 Documentation