This is a matter of timing. Your enemy has to wait, until the player gets created. while(!player)wait(1); should do it. Place it on the top of your code
Dude, if you can't make simple AI yourself, that just means that you aren't ready for it yet. Learn more, workshops and manual, learn some basics first, then you'll be able to make something! I did all I could, I pointed to very simple and easy to read (understand) script. You don't need animations? Just rip them out! You don't need gravity? Don't using then!