Character is jittering when strafing left and right while in the air

I am attempting to create a spectate system of a user’s first-person view but when I spectate a user who is starting left/right in the air their character jitters and shakes the camera for the person spectating.

GIF of what is happening: https://gyazo.com/713b245da914114387bbb6638d60ade7

I am testing this on a blank baseplate with only one script which is below

local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local SpectatingPlayer

UserInputService.InputBegan:Connect(function(Key, GameProcessed)
	if GameProcessed then
		return
	end
	
	if Key.KeyCode == Enum.KeyCode.F then
		if not SpectatingPlayer then
			for i,v in pairs(game.Players:GetChildren()) do
				if v ~= Player then
					SpectatingPlayer = v
				end
			end
			
			Camera.CameraType = Enum.CameraType.Scriptable
		else
			Camera.CameraType = Enum.CameraType.Fixed
		end
	end
end)

game:GetService("RunService").RenderStepped:Connect(function()
	if not SpectatingPlayer then
		return
	end
	
	Camera.CFrame = SpectatingPlayer.Character.HumanoidRootPart.CFrame
end)
2 Likes

Look at the grid baseplate when you strafe left and right.
The grid squares get further away (they are smaller) so it appears that your character is jumping up quite a distance.
It’s hard to see the jittering that you mentioned.
Maybe put some contrasting Parts on the baseplate so we can get a better visual of what’s going on.

2 Likes