Jittering when moving camera with part

I’ve got a part as the humanoid root part. I’ve scripted the camera to remain at a certain angle to the part.
The issue is, when the part starts to move, a jitter-like effect is produced. If there is a better way to achieve the same thing, do let me know. Thanks!
Here’s the code, it’s located in a local script in StartCharacterScripts:

wait(1.5)
local Part = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local Camera = game.Workspace.Camera
Camera.CameraType = Enum.CameraType.Scriptable
while true do
	Camera.CFrame = CFrame.new(Part.Position + Vector3.new(8,5,-8), Part.Position)
	wait()
end

This is expected to happen, while your checking from HumanoidRootPart.

Also, I recommend you use this:

while task.wait() do
	Camera.CFrame = CFrame.new(Part.Position + Vector3.new(8,5,-8), Part.Position)
end

Not required, but just preferrable.

2 Likes

That fixed it actually. Thank you very much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.