Help With Cam Zooming Out Effect

I’m currently working on trying to replicate a small camera effect in the hit game GTA V where when you switch characters it will quickly zoom out pause for a short amount of time then repeat until it moves across the screen and zooms back in to the character you just switch as, what I’m look for is the zooming out effect.

Heres a video example of what I’m talking about:

The script works but it puts it on a random x or y position from what I’m seeing before and its not zooming out, heres the code so far


local function TweenCamera(Cam,Info,Goal,Focus)
	local Tween = TweenService:Create(Cam,Info,{CFrame = CFrame.new(Goal)})
	if Focus ~= nil then
		Tween = TweenService:Create(Cam,Info,{CFrame = CFrame.new(Goal,Focus)})
	end
	
	Tween:Play()
	return Tween
end



function CS_Logic.CameraMovement(Camera,Data)
	
	local CamLocationPoints = {
		Rise = Data.CurrentLocation * CFrame.new(0,CamSettings.MaxZoomDistance,0);
		Lower = Data.Location * CFrame.new(0,CamSettings.MinZoomDistance,0);
		MoveToChar = Data.Location * CFrame.new(0,CamSettings.MaxZoomDistance,0);
		BehindChar = Data.Location * CFrame.new(0,0,10);
	                          }
	for i = 1, CamSettings.Stops do
		local StopsTweenInfo = TweenInfo.new(.1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
		local CurrentPos = Vector3.new(CamLocationPoints.Rise.Position.X,CamLocationPoints.Rise.Position.Y/i,CamLocationPoints.Rise.Position.Z)
		local Tween = TweenCamera(Camera,StopsTweenInfo,CurrentPos,Data.CurrentLocation.Position)
        task.wait(.1)
	end
end

Nevermind I figured it out :sob:
It was because in the CamLocationPoints I already have it zoomed out and everything
I added a Origin Point instead and changed the Tween function
oh yeah and set the cam to scriptable

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.