How to stop camera smoothly?

I have been trying for a while now and wasn’t able to get this working.

I’m making a run cam animation using math functions and as u can see in the video the camera stop immediately when the camera animation stops any idea how to make the camera stop smoothly??

game:GetService("RunService").RenderStepped:Connect(function(step)
if not bool then
-- Stop
else
-- Play
local now = tick()
	cam.CFrame *= CFrame.new(math.cos(somevalues),math.cos(somevalues),0)
end

end)
2 Likes

You can enclose the CFrame in a Lerp()

local cframe = CFrame.new()
game:GetService("RunService").RenderStepped:Connect(function(step)
if not bool then
-- Stop
else
-- Play
local now = tick()
	cam.CFrame *= cframe:Lerp(math.cos(somevalues),math.cos(somevalues),0)
end

end)
1 Like

already tried doing that but it didn’t work :((

2 Likes

Delete the RenderStepped line of code?

2 Likes

nope that didn’t help as well ://

2 Likes