Camera Shake happens as I move the camera in a loop?
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.
01 | local camera = workspace.CurrentCamera |
02 | camera.CameraType = Enum.CameraType.Scriptable |
03 | local target = game.Workspace:WaitForChild( "NPC" ).HumanoidRootPart |
04 | local part = game.Workspace:WaitForChild( "PartToLookAt" ) |
08 | camera.CFrame = CFrame.new(Vector 3. new((part.Position.X - 50 ) +(part.Position.Y + i), part.Position.Z),(Vector 3. new(target.Position))) |
10 | camera.CFrame = CFrame.new(Vector 3. new(camera.CFrame.p.X ,(i), 0 ),(Vector 3. new(target.Position))) |
15 | camera.CFrame = CFrame.new(Vector 3. new((part.Position.X - 12 ),(part.Position.Y + 7 ),part.Position.Z - . 4 ),(Vector 3. new(target.Position))) |
Notes: This is a Local Script in the player, Problem doesn't occur in single player (Yes I have FE on)