Make Camera Follow moving object for cutscene

I am making a scene for an animated YT video, so this script is only supposed to work in studio with “Run”. In the scene the camera is put at a pacific spot and then a second later it’s supposed to move to a moving vehicle, however it seems that the camera would only go to where the vehicle’s camera part was located first and not move with the vehicle. The camera part is welded to the vehicle and seems to move with the camera part, it’s just that the camera it’s self won’t follow.

If you are wondering how the vehicle moves, I have a script that just adds velocity to the base.

Camera Script:

local TweenService = game:GetService("TweenService")

local pos = script.Parent.cam1.Position

local lookAt = Vector3.new(0, 0, 180)

local cameraCFrame = CFrame.new(pos, lookAt)

local camera = workspace.CurrentCamera

local baseCFrame = script.Parent.cam1.CFrame

local targetCFrame = workspace.Roller.cam2.CFrame

script.Parent.cam1.Transparency = 1
workspace.Roller.cam2.Transparency = 2

camera.CFrame = baseCFrame

local tween = TweenService:Create(camera, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { CFrame = targetCFrame })

wait(1)

tween:Play()

1 Like