AI move before player (help)

I did this thinking about what u said, and it’s working perfectly right now. Any suggestions?