Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to measure velocity in one direction?

Hello. I am making a VehicleSeat-based driving system for road vehicles. The problem is, when the vehicle turns, the speed changes because it uses Velocity.Magnitude. How do I measure speed in one direction using lookVector or something else?

sp = s.Velocity.Magnitude

1 answer

Figured it out myself:

sp = (s.Velocity * s.CFrame.LookVector).Magnitude

This discussion is preserved as it was. New answers, comments, and votes are closed.