Making enemy follow player

So I have been trying to make my object(a sphere with sphere collider and sphere collider trigger) follow my player,but the script is giving out errors and i have no idea what do they mean,and how to fix them,here is the piece of code I wrote:

	// Use this for initialization
	void Start () {
		

	}
	
	// Update is called once per frame
	void Update () {
		if (playerdestructor == true)
			Debug.Log ("touchy");
		rigid.AddForce (Vector2.MoveTowards (self, player, 10f));
		if (playerdestructor == false)
			Debug.Log ("lonely :(");
	}
	void OnTriggerEnter2D (Collider2D col){
		if (col.tag == "Player")
			playerdestructor = true;
	}
	void OnTriggerExit2D (Collider2D coly){
		if (coly.tag == "Player")
			playerdestructor = false;
	}
}

You’re moving “self” towards “player” with a distance cap of “speed”. This will happen instantly. If you want to spread the movement over several frames, multiply speed by Time.deltaTime:

rigid.transform.position = Vector3.MoveTowards (self.position, player.position, speed * Time.deltaTime);

The delta time is the time between frames, ie. how much time has passed since the last Update.

This will also make the movement framerate-independent (a slow machine will have a larger deltaTime, so the object will move in larger steps but take the same time to arrive as it would on a fast machine).