How to move the camera

I want the camera to “zoom”. Essentially i have a tween that moves the camera to the scope, however for some reason it doesn’t stay there even after i put this

workspace.CurrentCamera.CFrame = tool.Scoped.CFrame

Anyone know why?

How are you attempting to tween it? What’s the code?

Is this what you’re looking for

1 Like

Try using the camera field of view

 function bindings.Mouse2Down(mouse)
	if sprinting == false then
 		local initialCameraPosition = camera.CFrame
 		workspace.CurrentCamera.CameraType = Enum.CameraType.Follow
 		local a = tweenservice:Create(workspace.CurrentCamera, TweenInfo.new(.4,Enum.EasingStyle.Linear), {CFrame = tool.Scoped.CFrame})
		local head = game.Players.LocalPlayer.Character:WaitForChild("Head")
		if head.LocalTransparencyModifier == 1 then 
 			a:Play()
 			workspace.CurrentCamera.CFrame = tool.Scoped.CFrame
 		end
		tweenservice:Create(workspace.CurrentCamera, TweenInfo.new(1), {FieldOfView = 50}):Play()
 		
 	end
 end

To add your own behaviour to the camera, you have to set the camera type to scriptable.
In other words:

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable

Keep in mind that this is going to completely strip away the functionality of the camera and it won’t follow you, so if you want it to follow you, you might want to change the FieldOfView instead.
Also, humanoids have a pretty neat property named CameraOffset. You should definitely check it out.

Thanks for the extra info, i’ll look into it.