How would I get the velocity of a part with a script?

I have a number value inside of a part that I want to store the velocity, so I want to know how to get the velocity to set it as the value.

1 Like

BasePart.AssemblyLinearVelocity

3 Likes

yes, but how would i keep getting the velocity infinitely
script so far:

script.Parent.AssemblyLinearVelocity = value.Value

By infinitely, do you mean you want to continuously check the velocity and store it for an indefinite amount of time? (sry im dumb so idk what u mean)

If so, you could run an infinite loop (such as a while true do loop or connecting your code to RunService.RenderStepped)

while true do
    wait()
    value.Value = script.Parent.AssemblyLinearVelocity
end
2 Likes

it worked, all i had to do was change the number value to vector 3 value

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.