If you encounter any bugs or errors please dm me on discord : Prexxo #6085
Code Example :
local LerpAPI = require(script:WaitForChild("Lerp API"))
local RunService = game:GetService("RunService")
local Object = game.Workspace.Object
local Point1 = game.Workspace.Point1
local Point2 = game.Workspace.Point2
local Point3 = game.Workspace.Point3
local Point4 = game.Workspace.Point4
local Start = Point1.Position
local End = Point4.Position
for i = 0, 1, 1/60 do
Object.Position = LerpAPI.Bounce(Start, End, i)
RunService.Heartbeat:Wait()
end
LerpAPI.Bounce(Start, End, 1)
This is lerps but with Styles, lerps are better than tween, but people dont use because tween have Styles And directions, so Preexoo created that module that can lerp with styles and directions like tween.
The reason I made it was for the people who want to get their code “quality” to the fullest. Tweening uses lerp methods (Linear Interpolation), I’ve taken original formulas from Roblox as well so it look the same anyways but here are a few reasons why you should consider switching to lerp : Tweening creates an instance ( Instances are pretty heavy to create ), as well as a new thread for every property u want to tween, with lerping u can handle it in 1 thread so as the result it will cost less to run, be more efficient and you have more control over.
then no, the reason is every “Connect” event creates a new thread which is not that bad as long as its not yielded and no RunService.Heartbeat:Wait() doesnt “nullify” it .
You are correct instances that arent parented dont consume any resources but in terms of efficiency and cost with lerping u can achieve way better results. Lerping itself already costs less and is more efficient but making a handler which would Lerp everything in one 1 thread , that would make it superior compared to tweening ( Tweening creates a new thread for each property that you tween)
Can you at least change the parameters? It is better to have arguments like at tween because the arguments at the functions of this module isn’t really looking good and usefull.
Sorry for the late reply, basically I’ve made this so people who are experienced scripters can replace the tweening without writing the formulas down themselves. Basically tweening creates a new instance, a new thread then uses LERP to tween it. Recently I made a Lerp Handler which allows me to lerp anything ex. lerp the size of 10 parts without creating a single thread and ofc its efficient its also compatible with CFrame, UDim2 (Vector by default). I’m still thinking if ill release it or not