-
What do you want to achieve?
I am trying to smoothly move the camera from the current position to another -
What is the issue?
It instantly teleports instead of moving smoothly -
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)