How to ignore Y+ and Y- in Velocity.Magnitude?

Hello, everyone.

I’m currently trying to do a Speedometer for my game, Redshift Arena. The only problem though, is Velocity.Magnitude also reads the Y+ and Y- so instead of the UPS being say, 160, which is taking the Magnitude and multiplying it by 10, jumping, falling, or anything on the Y axis in general will cause this to quickly jump above your walkspeed * 10.

I’m wondering if there’s a way to ignore the Y axis all together with Magnitude, or if there’s another way to do this entirely.

Thanks!

V = (Vector3.new(5,5,5) * Vector3.new(1,0,1)).magnitude

8 Likes

So would I put the HRP’s velocity where Vector3.new(5,5,5) is?

EDIT:

This works.
I accidentally put in Velocity.Magnitude previously.

Thanks for the help! :slight_smile:

1 Like