I meant just with that, I have the following on my sandcrabs script and it works everytime.
(Credit not to me, don't remember where I got it it was a long time ago)
private static boolean walkExact(Script script, Position position) {
WalkingEvent event = new WalkingEvent(position);
event.setMinDistanceThreshold(0);
return script.execute(event).hasFinished();
}
Sorry for no codeblock, don't know how to do it on mobile.
EDIT:
To be clear, I call that function over and over again until the player reached the position.