local function o()local o=tick()-tweenStart if o>=TWEEN_DURATION then o=TWEEN_DURATION CamLock.Update=Update tweening=false end local M=GetCameraRotation()local U=currentView.Ease(o,0,1,TWEEN_DURATION)local k=GetViewCFrame(tweenFromView,M)local v=GetViewCFrame(currentView,M)cam.CFrame=k:lerp(v,U)end
-- Update the camera with tweening:  (Used instead of Update function when animating between views)
local function UpdateWithTween()
	local duration = (tick() - tweenStart)
	if duration >= TWEEN_DURATION then
		duration = TWEEN_DURATION
		CamLock.Update = Update
		tweening = false
	end

	local camRotation = GetCameraRotation()
	local tweenAmount = currentView.Ease(duration, 0, 1, TWEEN_DURATION)
	local cf0 = GetViewCFrame(tweenFromView, camRotation)
	local cf1 = GetViewCFrame(currentView, camRotation)
	cam.CFrame = cf0:lerp(cf1, tweenAmount)

	-- If you like unreadable code, here's the above chunk (from camRotation) in one step:
	--cam.CFrame = GetViewCFrame(tweenFromView, GetCameraRotation()):lerp(GetViewCFrame(currentView, GetCameraRotation()), currentView.Ease(duration, 0, 1, TWEEN_DURATION))
end
