function OrientableBody.useCameraAsSource(N)local R=0 N.renderStepConnection=RunService.RenderStepped:Connect(function(s)local v=workspace.CurrentCamera if not v then return end local g=N:face(v.CFrame.LookVector)R+=s if R>Constants.SYNC_INTERVAL and g then R%=Constants.SYNC_INTERVAL updateBodyOrientation:FireServer(g)end end)end
-- Continuously compute a new body orientation to face the camera, and notify the server for replication
-- Intended to be used for the local player's character
function OrientableBody:useCameraAsSource()
	local timeSinceLastSync = 0
	self.renderStepConnection = RunService.RenderStepped:Connect(function(delta)
		local camera = workspace.CurrentCamera
		if not camera then
			return
		end

		local orientation = self:face(camera.CFrame.LookVector)

		timeSinceLastSync += delta
		if timeSinceLastSync > Constants.SYNC_INTERVAL and orientation then
			timeSinceLastSync %= Constants.SYNC_INTERVAL
			updateBodyOrientation:FireServer(orientation)
		end
	end)
end
