Hello there, I have been using lerp for a project of mine, but right after roblox rolled out the native fps unlocker, my lerps have been really acting up. I have also tried changing the wait time, but when I do that it jitters in mid air. Here is a snippet of my lerp usage:
task.spawn(function()
local dt = run.RenderStepped:Wait()
for i = 0, 1, 0.01 do
if ball.Parent:GetAttribute("CanUpdateLerp") == false then return end
local rayparams = RaycastParams.new()
rayparams.CollisionGroup = "ServerBall"
rayparams.IgnoreWater = true
local rayres = workspace:Raycast(ball.Position, ball.CFrame.LookVector * 3,rayparams )
if rayres and rayres.Instance then
if rayres.Instance.Name == "Net" then
print("netdetected")
for i = i, 1, 0.01 do
if ball.Parent:GetAttribute("CanUpdateLerp")== false then return end
if lv then
ball.CFrame =CFrame.lookAlong(Vector3.new(CFrame.new(quadbezier(i * dt * 60, pos1, pos2, pos3)).p.X, CFrame.new(quadbezier(i * dt * 60, pos1, pos2, pos3)).p.Y, rayres.Instance.Position.Z - lv.Z * 2), lv)
print(lv:Dot(ball.CFrame.LookVector))
else
ball.CFrame = CFrame.new(quadbezier(i * dt * 60, pos1, pos2, pos3).X, quadbezier(i * dt * 60, pos1, pos2, pos3).Y, rayres.Instance.Position.Z)
end
task.wait()
end
end
return
end
if lv then
ball.CFrame =CFrame.lookAlong(CFrame.new(quadbezier(i * dt * 60 , pos1, pos2, pos3)).p, lv)
else
ball.CFrame = CFrame.new(quadbezier(i, pos1, pos2, pos3))
end
task.wait()
end
end)
With this code, the lerp stops extremely early and I am not sure what to do.
Thank you in advance