How would I lerp a part, but with a time value?

Pretty self explanatory.

How would I lerp a part, but with a time value? (Using tween service isn’t an option as it doesn’t work with plugins.)

So basically just tween service but useable in plugins.

For anyone who is looking for a solution someone gave me this code that somehow worked? Not sure how my old one didn’t but this does…

   local runservice = game:GetService("RunService")
    function lerp(part,goal,t)
        local timepassed = 0
        local start = part.CFrame
        while timepassed <= t do
            timepassed = timepassed + runservice.Heartbeat:Wait()
            part.CFrame = start:Lerp(goal,timepassed/t)
        end
    end
6 Likes