Velocity meter (RoundedBox / Rectangle

Hey everyone,

Trying to make an HUD, i’ve got a velocity meter but through draw.SimpleText i want it to be on a RoundedBox or Rectangle, like a health bar… higher velocity higher the bar.

Can’t for the life of me figure it out… any help appreciated thanks! <3

ps. Probably really simple don’t judge :wink:

Just create a bar but instead of “Height” put velocity.

also for the bar fraction use

math.Clamp(pl:GetVelocity:Length(), 0, pl:GetRunSpeed() )/pl:GetRunSpeed()

Thanks for the response

draw.RoundedBox( 0, 100, 100, math.Round(ply:GetVelocity():Length() * 0.056818181, 50, Color( 255, 0, 0, 255 )

My failed attempt aha, any ideas?

[editline]28th February 2014[/editline]

Sorry been an uber retard, anyone having problems with this it’s

draw.RoundedBox( 0, 30, ScrW() / 1.88,ply:GetVelocity():Length() * 0.056818181, ScrW() - 1640, Color( 50, 80, 230, 200) )

Thanks everyone for help <3