✓ Accepted answer
To do that, try to make a RemoteEvent and trigger it whenever the camera rotation is changed. Send the new camera rotation as a parameter to the RemoteEvent. The RemoteEvent will be connected a server script, and the server script will change the rotation of the player from the parameter you passed. You do not have to specify which player to rotate the head, as there is a default 'player' parameter that is passed to your function that is listening to the RemoteEvent.
For an example, I will show you the server script:
local event = game:GetService("ReplicatedStorage"):WaitForChild("HeadRotationEvent")
event.OnServerEvent:Connect(function(player, newRotation)
end
I hope this explanation is of help.
2 comments
It Would need to be inside of a server script since you are trying to move something inside the workspace
The script doesn't work in a server script