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.

2 comments
Do you mean the npc stops moving after the animation? Or something else?
Should you do an animation that does not requiring moving or just teleport it back to its normal position