How to camera tween CFrames that are constantly changing?

I have a helicopter infiltration scene that I use in my game. I have 2 parts, one as a start, then tween transitions into the second part. This is the script that I use:

		-- Use the world position (CFrame) of the attachment
		local targetCFrame = attachment.CFrame 
		Tween:Create(Camera, TweenInfo.new(speed, Enum.EasingStyle.Quint), {CFrame = targetCFrame}):Play()
	end

	local heliPart = workspace.Alaska:WaitForChild("InfilHelis"):FindFirstChild(Player.Team.Name)
	local camAttachment1 = heliPart:WaitForChild("HighCam4"):FindFirstChild("1")
	local camAttachment2 = heliPart:WaitForChild("HighCam4"):FindFirstChild("2")

	Camera.CFrame = camAttachment1.CFrame
	TweenCameraPos(camAttachment2, 4) ```


This script does work fine in it's case, however since the parts are moving, the execution is not accurate because the CFrame is already changed, so the perspective is just in mid air. What can I change to make it so that I can achieve a moving camera going from part to part while the CFrame is changing?
1 Like

I’m not sure what you are asking for help with, the title is a bit vague but it seems like multiple parts are being tweened and you trying to put the camera on one of them, but since they are already tweening the camera’s CFrame is now inaccurate since it’s CFrame is based off of another part’s CFrame that Is being tweened.

Could you show more of the code? You could try using lerps to achieve your goal by the way.