Bot.Humanoid:MoveTo(Pos)
This is part of my script for programming an NPC. Is it possible to make it so that it waits until Bot makes it to Pos before continuing on with the script, or am I going to have to figure out a way of doing this myself. I've already tried to fix this by putting it in a function rather than its own line of code by itself, but that didn't help.
I would calculate how long it should take to walk there, wait that long, and if they still aren't there, recalculate and wait the new time until they arrive.
Bot.Humanoid:MoveTo(Pos) while(Bot.Torso.Position-Pos).magnitude<5 do wait((Bot.Torso.Position-Pos).magnitude/Bot.Humanoid.WalkSpeed) end
Give a range for how close it should be before it "arrives," because it isn't going to be exactly in that position.