I was trying to make a repeating and tweening camera using while true do and tweeninfo. The current camera CFrame starts on the first camera and would switch into the second camera every 7 seconds with a tween and also on repeat.
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local tweenService = game:GetService("TweenService")
function tween(part1, part2)
local tweenInfo = TweenInfo.new(5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
local tween1 = tweenService:Create(camera, TweenInfo, {CFrame = part2.CFrame})
local tween2 = tweenService:Create(camera, TweenInfo, {CFrame = part1.CFrame})
while true do
camera.CFrame = part1.CFrame
tween1:Play()
wait(7)
tween2:Play()
wait(7)
end
end
tween(game.Workspace.Cam1, game.Workspace.Cam2)

1 comment
oh wait i realized, you made a typo in line 8 and line 9