Hey all, when I use this script:
local RunService = game:GetService("RunService")
local car = script.Parent.Car.Value
local p = car.Body.Cam
local cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
cam.FieldOfView = 50
RunService.RenderStepped:Connect(function()
local carSpeed = car.DriveSeat.Velocity.Magnitude
local smoothness = 1000 / (carSpeed / 10)
local pos = p.CFrame * CFrame.new(0, 1, 5)
cam.CFrame = cam.CFrame:Lerp(pos, 0.3)
if carSpeed > 100 then
cam.CFrame = cam.CFrame * CFrame.new(math.random(-1, 1) / smoothness, math.random(-1, 1) / smoothness, math.random(-1, 1) / smoothness)
end
end)
to make a car camera, the lerping always twitches behind the car. Is there any way to fix this?