Setting CFrame repeatly on client producing choppy movement on server. So basically in our game, we give players the option to lock onto other players to make fighting easier. We do this by binding the following function to the renderstep:
local pos = proxy:getController():getLockedTarget():GetPrimaryPartCFrame().Position
local lookAt = Vector3.new(pos.X, game.Players.LocalPlayer.Character:GetPrimaryPartCFrame().Position.Y, pos.Z)
game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(game.Players.LocalPlayer.Character:GetPrimaryPartCFrame():Lerp(CFrame.new(position, lookAt), 0.6))
This is bound using the following function:
runService:BindToRenderStep("Character", Enum.RenderPriority.Character.Value, characterFunc)
Where characterFunc contains the code above. The movement is very smooth on the client, however it is very choppy when observing other players locked on. We would have given up on it by now, but other games like Right 2 Fight have smooth lock on on the client and server end, so we know its possible. We have tried a bunch of different stuff to try to solve this but we have run out of ideas, so we are here for help. Video below of issue.