Lerping vs Tweening

I saw a bunch of posts on this on this topic, but they didnt exactly get me the info I wanted.

So my question is which should I use, lerping or tweening.

Context

I am currently creating a system that plays an animation (using either tweens or lerping for moving the parts), said animations should be able to be played again later on, and that sorta thing.

So which is the best one to use for this scenario?
What are the pros and cons for both methods?

Thanks!

Lerp is good for “classic” styled animations where the animation isn’t smooth. (Just imagine the for-loop “animations” in classic roblox games.)

Tween is for smooth animations, like those used in more recent simulators. Think of those low-poly simulator or tycoon games.

1 Like

Lerping is mostly used for getting the percentage numbers between two numbers I guess. You have to use a loop to use lots to animate and this can be very hassling with many animations.

Teeening is specifically made for animation and has multiple options and customization.

Lerping isn’t really even a way of animation and which is why it’s barely ever used for it. Only really in examples of using it have I seen ppl use it for animation

In conclusion: use tweens, and the pros are it’s way more efficient and customizable

1 Like

They are the exact same thing when it comes to their basic function being to take you from Point A to Point B, (in fact all Tweening is, is a way to control interpolation of an object) but it depends on how want to controling it, or your specific needs when it comes to the task.

If its a animation that is simple, and going to reused (such as a door, or a motor), you would use Tweens for this purpose as it saves the data to do the Tween allowing you to Cancel them, and Play them again without the need to constantly recreate the same effect.

For fast calculations, getting a percentage from point A to Point B, or for more advanced versions of interpolation (eg: Bezier or Cubic Curves) you would use standard Linear Interpolation as you would have better control over the position and method of which its interpolated.

TLDR:

  • Tweens are useful for simple animations, and can be reused, allowing you to avoid recreating
    them.
  • Standard Interpolation is useful for more advanced methods of said animations, whether it be Bezier Curves, and better control of how the point is handled.

All depends on your use case.

Tweening just lerps values over time. As such you can think of lerp being used in a tween. TweenService just manages the lifecycle of lerping for you. Tweenservice also has stylized functions to set the percentage of a lerp at different speeds to make them not all linear. You can however use tween service to get those values yourself with one if it’s functions if you need just the percentage for custom tweens or whatever.

I would favor tweening because it reduces complexity on your end. The only time I would recommend not using tween service is if you need to support a property type that tween service doesn’t support. Or if you want to tween pure data in your script instead of a property. (Though I still recommend getting the stylized functions from tween service for those).

So in your case: Tween Service

Lerping uses simple linear transitions and requires manual implementation, making it lightweight but limited in customization. Tweening, through TweenService, supports complex easing styles, is easier to use, highly customizable, but slightly heavier on performance.