Camera Lerp Jitter

I already kind of get the reason why this is not working, but I think it would be better if someone helped me out on this.

I want to make a camera that follows the player in a 2D Way but lags behind and catches up to player.

You can kinda see what im trying to accomplish from my attempt:
https://gyazo.com/146d2ea500d39ba8e15014328346d744

This is my code:
https://gyazo.com/6758627abc971dbac53cf5c237120aca

Thanks in advance

1 Like

Nvm just fixed it myself, for those who are looking to make something similar here is the code
https://gyazo.com/921e1c931ae93a321b629ef5381d72f4

It looks something like this:
https://gyazo.com/a71478e82fc65d503dcd1ec9a0b924a1

With a little work you can make it smoother but this is my answer.

1 Like

On a side note I don’t recommend this, you may want to use the tween service, as this causes issues for mobile users, who have less computational power. So replacing the lerp part with Tween can improve this feature.