Rotate player to enemy from array

I know it that this code will work that way. It’s just a temporary solution. I even tried to only face the closest enemy as well but that didn’t work either. I just don’t know how to make it work that’s why I asking for help.