you can fire the event every 0.2-0.5 seconds or so and lerp the previous value with the same time as the firing debounce, as far as I’m aware this doesn’t put a lot of pressure on the server as long as you set some local sanity check to optimize remote usage whenever possible.
as for the code you can do this
--Local Script
local MinY = 0.92 --//highest look angle
local MaxY = 0.92 --//lowest look angle
local Previous
while wait(0.2) do
if not hum then return end
local look = mouse.Origin.lookVector.Y
if Previous ~= look and look > -MinY and look < MaxY then
remote:FireServer(look)
end
Previous = look --//making sure the client doesn't send multiple remotes with the same arguments
end
--Server Script
game.ReplicatedStorage.Remote.OnServerEvent:Connect(function(plr, mousepoint)
if mousepoint < -0.92 then
mousepoint = 0.92
elseif mousepoint > 0.92 then
mousepoint = -0.92
end --//verifying the look angle incase the client bypassed the check
local chr = plr.Character
local torso = chr.Torso
local Neck = torso.Neck
local LeftShoulder = torso["Left Shoulder"]
local RightShoulder = torso["Right Shoulder"]
local RC0 = CFrame.new(1, .5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
local LC0 = CFrame.new(-1, .5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) --//base C0 cframes for the left and right shoulder
local function TweenMotor(Motor, EndCF)
local prop = {C0 = EndCF}
local info = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) --//editable
game:GetService("TweenService"):Create(Motor, info, prop):Play()
end
local look = CFrame.Angles(0, 0, math.asin(mousepoint))
TweenMotor(RightShoulder, RC0 * look)
TweenMotor(LeftShoulder, LC0 * look:inverse())
end)
which should move your arms up and down according to the direction of your mouse, of course do edit these to serve your intended purpose