Server Is Able To use its controller but the clients never go through

I click the button and it moves to the controller


Then the controller calls the event in the gamestate

The gamestate increments an interger then moves on to the final stage where its supposed to tell everyone who got the vote

The problem is the clients are not getting to this final part of the code and I’m not sure why any help would be great!

Create an event in the controller (not RPC, standard), which will then call your server event.
Call the new non-RPC event from the widget.

Unfortunately nothing changed do you think the problem is that it is in the gamestate?

Well, I was wrong to think that clients own their Game State… :roll_eyes:

Yes, but not quite.
The problem (feature) is how network interaction works in Unreal.
For an RPC to go from a client to a server, the client that is trying to call it must own the actor which RPC you are trying to call it.

So you either need to make the client the Game State owner on the server (which will be a problem if you have multiple clients), or call the server RPC in another actor which the desired client already owns, which will be different for each client.
The easiest way is to make a server RPC in the Player Controller.





This is what I came up with but the server is still not quite getting all of the clients addition after turning it into a rep notify!

Rep Notify are originally intended to synchronize clients with the server, and in C++ they are not called on the server at all. In Blueprint - they do work but not always (as you may have noticed).

Now everything looks functional, but you just need to do the necessary actions with the variable on the server outside of Rep Notify.

Rep Notify you will need it if you want clients to also see how many players are ready, and in it you will need to make, for example, a call to the function for updating the widget that the client sees.

I restarted and verified my files and it works now so idk