Need help to get player to face enemy when attacking

If you calculate WorldLocationOfEnemy - WorldLocationOfPlayer you get a vector that is the difference in position of the two. If you convert this vector into a rotator and set the rotation of your player to this rotator, this should do the trick.

You can also check the length of this vector to get the distance the player has to the enemy, and if it is too big, not apply the rotation.