How to find the "current" speed of a vehicle?

Hi, I’m trying to find the current speed of a vehicle or VehicleSeat so I can make the vehicle sound pitch change depending on the speed.

I have already tried this:

while true do
   wait()
   print(Vehicle.VehicleSeat.AssemblyAngularVelocity.Magnitude)
end

But it doesn’t work… Its just printing 1 or 0, so I’m assuming its just getting the SteerFloat value and not the actual vehicle speed.

How would I do this?

1 Like

That’s measuring angular velocity how much it rotates in radians per second.

Try measuring assembly linear velocity instead, or you can use the get velocity function, or even just the deprecated .Velocity which should still work just fine.

1 Like