repeat
script.Parent.Position += Vector3.new(-2, 0, 0)
wait(0)
until whatever
since my part is moving 2 blocks away every wait(0), how fast is it moving?
I need help with this so I can calculate how long it should take for it to get faster Edit: since i want it to change after entering a certain amount of rooms, i did this: 30 (wait(0)s in a second (i think)) * 2 (speed) / 56 (length of room) = 1.07 rooms per second Would that work?
Using that will return the studs per second a part is moving on every axis.
If you want only the X and Z speed, you can create a new vector using the velocities X and Z, but setting Y to zero.
--// Get the velocity Vector
local Velocity = Part.Velocity
--// Change the vector to a number and update the variable
Velocity = Vector3.new(Velocity.X, 0, Velocity.Z).Magnitude