Why is the block spinning around my FPController?

I learned the A.I movement from a free script, made by JesseEtzler0, and use it for my project. When I attain it to the block and pressed play it just circle around my player. Why is that happening?

You have no check in your code. You need to stop him before he reaches your player,he spins like that because he is passing over the center of your player. The code looks like the one from burgzzergarcade keep following the tutorial and he shows you how. If it is not that tutorial look up burgzergarcade on YouTube and check out his Ai script.