How do I calculate how many studs per second per walkspeed

Ok that sounds really confusing i realise.

its hard to word into just a title

So im looking to create an anti walkspeed module to use in my games, but im just wondering how i will calculate how many studs per second a character moves.

Is SPS the same as the walkspeed that you set?

you could use the x^2 + y^2 + z^2 = distance to center^2 and then do it on the last position and the new position and find the difference

1 Like

The possible studs/sec could be anywhere from 0 to the player’s walkspeed in the X and Z directions. A player’s Y change would need to factor gravity and other forces.

I haven’t ever done any major anti-exploit scripts, but I’d assume you’d want to use some form of distance check per unit of time (velocity).

1 Like

Yes, WalkSpeed is studs per second.

((NewPosition - OldPosition) * Vector3.new(1, 0, 1)).Magnitude / TimeTaken

Edit: added vector3 multiplier to remove Y direction changes.

6 Likes