Why is the method being called every frame even though it is InvokeRepeating?

This is a snippet of logic from a basic enemy I created. It is supposed to get the distance from the player, and if the player is close enough, Instantiate a Trigger box to deal damage, and then destroy the box. It is supposed to instantiate the box every 3 seconds, with the help of the InvokeRepeating. However, after the first initial 3 seconds, instead of continuing to get called every 3 seconds, it gets called every frame, resulting in insta-death. Everything else works fine though.

if (Vector2.Distance(player.transform.position, transform.position) <= 1.5f) {
			InvokeRepeating("Attack",3f, //Works Fine
            3f); //Gets ignored. Method gets called every frame.

		} else {
			CancelInvoke(); //Works Fine


Attack method:

void Attack () {
			GameObject clone;
			clone = Instantiate (attack, attackposition*.position, Quaternion.identity) as GameObject;*
  •  	Destroy(clone, .01f);*


You are starting a new InvokeRepeating every frame as long as your if statement is true:
if (Vector2.Distance(player.transform.position, transform.position) <= 1.5f)
I assume the if statement is used in your Update function

If what I say is true then you need to check if you already started the invoke.