Handbrake for a car (top down)

I’m trying to create a top down game with cars. I created driving prototype but I have no idea how to approach the handbrake use. I imagine it like this: I press the Space button and it should gradually reduce the speed to 0 but I don’t know how to stop at 0 since my “speed” variable can be negative (in order to have “a reverse gear”). Same situation when I’m in reverse (negative speed), it also should gradually stop the car.

Here’s how my events look like at this point:

Hi!
Try adding the condition if speed is not equal to 0, so when the car speed is = 0 it will stop working. That is only if the speed is coming down without skipping numbers.

Or I think you can set the speed variable to 0 with a formula with an interpolation like a lerp probably. Not sure about this, haven’t make it myself but if it works might be the best way to do it.

Thanks for the idea but id didn’t work as good as I hoped unfortunately. I’ve added it like this (the second condition is to prevent from gaining negative speed like in reverse):

Now I think that the problem is with multiplying the speed by a 0.99 value which naturally lowers it down but it will never reach true 0 (which I realized when I added a text with current speed displayed).

Maybe I’ll have to try different aproach and start whole thing from scratch…