C# enemy AI Rotation

ok I fixed the targeting part of my script but now the enemy rotates continuously here is the code again

using UnityEngine;
using System.Collections;

public class EnemieAI : MonoBehaviour {
	public Transform target;
	public int moveSpeed;
	public int rotationSpeed;
	
	private Transform myTransform;
	
	void Awake(){
		myTransform = transform;
	}

	// Use this for initialization
	void Start () {
		GameObject go = GameObject.FindGameObjectWithTag("Player");
		target = go.transform;

	}
	
	// Update is called once per frame
	void Update () {
		Debug.DrawLine(target.position, myTransform.position, Color.cyan);
		
		//look at target
		myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position + myTransform.position), rotationSpeed * Time.deltaTime);
		
		//move towards target
		myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
	}
}

line 27 continuously rotates the object it is attached to I want it to rotate to look at my player object I am currently playing around with the script to try and resolve it

To fix your current code you need to subtract the object position from the target position, not add it:

 myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed * Time.deltaTime);

The suggested Transform.LookAt() is a viable solution, but it does not Slerp() the rotation. It does an immediate rotation.

Why not use:

Transform.LookAt(GameObjectWhatever.transform.position); ?