Replicate from Server to Client not working properly

On my Player Controller, I want to retrieve the Player’s state from the server. To do this, I created a Custom Event (RPC) that runs On Server. In this Custom Event, I call another Custom Event that runs on Owning Client, passing the Player’s state through a parameter.

The conclusion: the event that runs on the server works properly, whilst the event called from the server to the owning client does not.

I’m completely unsure why, and even after doing some research, no results were satisfactory nor resolved my problem.

Does anyone here have an idea of what’s going on?

To help you help me, here you go a screenshot of my blueprint:

As a side reminder, the Print String on Request State Success is not being displayed because that event is simply not triggering.

According to this document, seems there’s nothing wrong with my approach, and the only question effectively similar to mine is left unanswered. Maybe a bug?

Ok. I have a workaround.

I was calling Request State (Server) on BeginPlay of my PlayerController. I don’t know exactly why (yet), but after placing a Delay of 0.2s, it works fine.

Of course, this isn’t the best solution, but it allows me to keep going. I really would like to hear from the experts why this is happening and what’d be the appropriate solution.

Please, people, don’t be shy.

I had the same problem. In my GameMode I use the Event OnPostLogin, which gives you a Player Controller. According to the [documentation][1]: “This is the first place it is safe to call replicated functions on the PlayerController.”

But when I try to call a Custom Event that should Execute on Owning Client it only works on the server, never on the client. Adding a delay of 1.5 seconds solved the problem (delay of 0.2 seconds was not enough). So it seems the Player Controller is somehow not ready/initialized(?) despite what the documentation says… I don’t know… But now it works at least…

Thank you for helping me solve this!