How to smoothly move camera from one position to another?

  1. What do you want to achieve?
    I am trying to smoothly move the camera from the current position to another

  2. What is the issue?
    It instantly teleports instead of moving smoothly

  3. What solutions have you tried so far?
    I am using lerp to move the camera

on = true
local plr = game.Players.LocalPlayer
mouse = plr:GetMouse()
local RunService = game:GetService("RunService")
local cam = workspace.CurrentCamera
local rigidness = 1
local PartToFollow = workspace.DefaultCamera.Part
local partTargetOffset = CFrame.new(0, 0, 0)
plr.CameraMaxZoomDistance = 1


function update()
	if on == true then	
		local goal = PartToFollow.CFrame*partTargetOffset
		cam.CFrame = cam.CFrame:Lerp(goal, rigidness)		
	end
end

RunService.RenderStepped:Connect(update)
game.Workspace.Systems["Urusto-Hifen"].System.ClickDetector.MouseClick:Connect(function()
	PartToFollow = game.Workspace.Systems["Urusto-Hifen"].System.Cam
end)

i think you just need to change the rigidness to anything under 1 to make it smoother, the closer to 0 the smoother it gets

local TweenService = game:GetService("TweenService")

local part = workspace.Part

local Tween = TweenService:Create(workspace.CurrentCamera, TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {CFrame = part.CFrame})
Tween:Play()
1 Like

Fixed it by changing the camera to Scriptable and changing the rigidness to 0.01.

2 Likes