I have a cut-scene type of thing where the camera is looking at a walking NPC and continues to look at it while also moving. After doing that, the camera moves and is stationary. The problem occus when I am moving the camera in the loop. The camera is constantly shaking along the Y axis if you were to split the screen into a grid.
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local target = game.Workspace:WaitForChild("NPC").HumanoidRootPart
local part = game.Workspace:WaitForChild("PartToLookAt")
for i = 2, 19, .1 do
if i < 14 then --Stops moving forward, only up a little bit.
camera.CFrame = CFrame.new(Vector3.new((part.Position.X - 50) +(part.Position.Y + i), part.Position.Z),(Vector3.new(target.Position)))
else
camera.CFrame = CFrame.new(Vector3.new(camera.CFrame.p.X ,(i),0),(Vector3.new(target.Position)))
end
wait()
end
wait(.1)
camera.CFrame = CFrame.new(Vector3.new((part.Position.X - 12),(part.Position.Y + 7),part.Position.Z - .4),(Vector3.new(target.Position)))
Notes: This is a Local Script in the player, Problem doesn't occur in single player (Yes I have FE on)

1 comment
Another Note: The problem isn't predictable. It happens at random intervals and stops at random intervals too