Playing sounds on object collision without sound repeating itself

Yea but when do you decide to reset it? I tried this resetting the value when velocity was near 0 but didn’t work well.