How can I replicate a variable from a client to everyone else?

In my custom player, i have a look direction for the head, and i want to replicate that angles to everyone else. Its updated each tick, so calling a server function is a no-no, and i also cant calculate those in the server becouse they are tied to the imput. Im asking for the replication function that will replicate the variable from my client to the server, and from that server, to everyone else.

There’s no support for clients replicating directly to other clients, it’s fairly unsafe and the only way that would work would be through the server, so it would just cause the same issue you’re trying to avoid.

You can call an “update” server function periodically to update the server about the value. Maybe once a second or so, and then have the clients interpolate if needed. ServerSetSpectatorLocation is an example of this usage. It’s actually fine to call RPCs fairly often, Character::ServerMove is called whenever a player moves at all. You will want to compress your vector/rotator, ServerMove is a good example of that kind of compression in action.