Get previous velocity of Rigidbody?

Hi,

I know how get the velocity of a Rigidbody, but I need it’s velocity which was a second/some frames ago…
I need this so that my car gets damaged if it hits sth at a certain speed, to receive a dent.

This is hard to explain… I hope I could describe properly. (sry for my poor english)

I just need to store the velocity for a few frames.

I’m scripting in JS.

Then store the velocity for a few frames.

Calculate and store the velocity, then make a counter and wait a few frames before you collect the velocity again.

if(frames>3){
   GetVelocity();
   frames=0;
}else{
   frames++'
}