Speed tracking system

Hi, I’m here wondering if there’s a mechanic that can be used to calculate an object’s speed, but only in one direction (right in my case). I’m making a 2.5D right-moving racing fangame and I want to know how to track speed in order to create a speed calculator. It’s not a necessary system, but I figured it would make for a really neat aesthetic.

Maybe something of this example can help u:
https://editor.gdevelop-app.com/?project=example://animation-speed-scale

Thanks for trying to help, but that only works with platforming and I’m not looking to increase the speed of the racers’ animation (albeit, there isn’t too much going on for that part). I just want to calculate the speed of the racers, if possible.

I actually figured something out now, thanks for helping, though.