Camera randomly flies forward after tweening

Video


If you can’t tell because of the low video quality, the camera tweens to the correct cframe (a part’s cframe) which is where it slows down. It then immediately tweens forward much more quickly to a position far in front of it.

Workaround

I have found a workaround to this by having it set the camera’s cframe back to the part on render stepped after the tween completes, but this is temporary and I would still like to know why this happens.

A few more details:

  • This actually only happens when the camera ends the tween at certain angles, for example, if I rotate the part to face 50 degrees more to the left, this doesn’t happen
  • It also only happens when the part is in a certain area. If I move the part backward about 20 studs and the camera tweens to there it doesn’t happen
  • This is the tween code:
local camTween = game:GetService("TweenService"):Create(cam,TweenInfo.new(1),{CFrame = arena.CameraPos:FindFirstChild(partyFolder.Players:FindFirstChild(player.Name):GetAttribute("Team").."Tube").CFrame})
camTween:Play()
  • No other part of the code could be causing this as when I comment out the tween:Play() line it doesn’t happen at all, and no other code in my game tweens the camera
    If anyone as any questions or possible solutions I encourage all replies. I appreciate any help in advance!

Set the camera to scriptable, then run the tween and when the tween is completed, set the camera cframe to the goal destination.

If the cam isn’t scriptable, it wouldn’t even allow us to tween it.