Hi! I’m trying to make a smooth camera mechanic where Humanoid.CameraOffset.Y
equals HumanoidRootPart.Velocity.Y
times -0.2 (using Lerp.) However, when I try to do this, it isn’t smooth.
I thought I was able to do it before this, and it worked, but now it won’t.
function Lerp(a,b,t)
return a + (b-a) * t
end
hum = script.Parent:WaitForChild("Humanoid")
hrp = script.Parent:WaitForChild("HumanoidRootPart")
while true do task.wait()
hum.CameraOffset = Vector3.new(0,
Lerp(hum.CameraOffset.Y, hrp.Velocity.Y, 0.1),
0)
end