Character rotates slower on the server

I’m making a game with 2d movement, I wanted to instantly change the direction of the character to left and right.

It works fine on the client but rotates slowly on the server for some reason.

video of the issue:
https://gyazo.com/d2592974f1f28d55dc608d4f6f660c6b

I checked roblox’s default control module and couldn’t find anything

local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

while wait() do
	if char and char.HumanoidRootPart then
		char:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position, game.Players.LocalPlayer.Character.HumanoidRootPart.Position+Vector3.new(-35,0,0)))
		wait(1)
		char:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position, game.Players.LocalPlayer.Character.HumanoidRootPart.Position+Vector3.new(35,0,0)))
		wait(1)	
	end
end

this is ping/internet related you can’t really do anything about it.