Here's the code: https://pastebin.com/hcrk1aXh
The problem with it is that when the animation stops, the teleportation is a bit delayed, causing visual bugs, as such: https://cdn.discordapp.com/attachments/569116898923380740/645750528856424478/Video_17-11-2019_17-33-54.mp4
And my question is: is it possible to get rid of the visual bugs? I have considered remaking the animation so it's in one place and then moving the NPC physically, but I want to consider other options.
EDIT: Since nobody understands, let me explain. IF I were to only stop the animation, the NPC would go back to where it was at the beginning of the animation, and I want it to stay where the animation ends.
https://developer.roblox.com/en-us/api-reference/function/AnimationTrack/Stop this will probably help