How to efficently update players' heads?

I have planned to make a system where server recieves a point where a player looks at and then makes his head look to that point, but I kinda think it will be quite laggy especially considering the game is planned from ~30 players. So any efficent known ways to implement that?

I made this system once, it was tricky but in the end it’s really simple, just use Unreliable Events
and it should not lag. You send your own head CFrame to the server and give it to everybody else on the server.

also if you want to you could but dont have to make it with RunService, in my version I used while true do loop and updated players head using the lerp function on CFrame, you could also tween it but thats really your own decision. Hope this helps :+1:

Actually I made it with RunService:BindToRenderStep on Camera Value because of a tilt, I just put a tick delay on it by calculating

if currentTick - lastUpdatedInterval >= CamSettings.updateInterval then
-- currentTick = tick()
-- lastUpdatedInterval = currentTick
-- updateInterval = 0.25

Changes to a character should replicate to all clients. So as long as the head is part of your character with a humanoid it should already replicate.

I mean, checking where a certain player looks should already include the use of local scripts, and this check should be done a ton of times for each player as well, sooo

send the cframe to server at 1/20 rate, and interpolate on each client

Since the network owner of a character is its own player, you can just use a LocalScript in StarterCharacterScripts, calculate where the player is looking, then rotating the characters head towards that direction.

cosmetic (visual) changes do not replicate