How do i make an npc accelerate with moveto

working on a project based off of meme nextbots from gmod and i’m wondering,

how could i make a non-player character accelerate speed while using :MoveTo() and then when at maximum speed, keep that speed constantly until it stops moving?

if its also possible to do deceleration the same way please let me know

Is this a humanoid walking / moving?

humanoid using :MoveTo() to move to the nearest player every 3 seconds

Modify the Humanoid’s WalkSpeed property.


it doesnt seem to work with moveto but ill try a different way

use a loop that checks if npc is walking and if it does, add +.1 walkspeed till ur max ws, and when it stops walking just set back the default walkspeed