ue5 multiplayer update only on the server

I am experimenting with multiplayer basics in the ue5 blueprint . I have created a custom player controller and a custom playerstate . in the playerstate i have added a replicated float variable called health .

In the player controller , I have created a “run on server” rpc that just gets the player state and increments the health value .

Also i have added an umg that bind and display the health value on screen I am testing with a liseten/server option and 3 clients .

If i call the rpc from any window , it updates only the health value on the server and not on the caller player .

Any idea on what’s going on?

Solved :
i was getting the wrong playerstate with the node “Get PLayer state” with index 0 wich give the first playerstate in the playerarray so the server .
instead i had to use the playercontroller->Getplayerstate wich give the correct one .

i have learned something today :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.