Speedometer help

How can I make a speedometer like the one in Driving Empire with this speed bar that increases as the player accelerates the vehicle? I have no idea where to start or how to make this GUI.

image

I think its 2 images, one darker and one lighter, and there’s a canvas group that covers the brighter one and depending on the speed, it moves up or sizes up.

What do you need help with? the scripting or the ui?

In terms of UI, you can create a white image and use a uiGradient to change its color relative to the speed. Another option is to use frames to create individual lines but that’s more trouble than its worth.

In terms of code, you just need to get the player or car’s distance and time. To do this, you can follow this logic:

local time = 0.5

local pos1 = car.Position
task.wait(time)
local pos2 = car.Position

local distance = (pos1-pos2).magnitude
local speed = distance/time

In the UI, I want to know how to make the bar with individual frames work