Projectile wont move

Here’s the script, it’s at the bottom.

var node : Transform;
var enemies : GameObject[];
var targetEnemy : GameObject;

var fireAt : Transform;
var spellTransform : Transform;

var minionSpeed : float;
var distance : float;
var attackTimer : float;

var minionHealth : int;
var minionDamage : int;

var distracted : boolean; // if it's do anything besides walking

function Start() {
	minionSpeed = 1;
	minionHealth = 300;
	minionDamage = 25;
	distracted = false;
	targetEnemy = null;
	attackTimer = 3f;
	node = GameObject.FindGameObjectWithTag("Node").transform;
	enemies = GameObject.FindGameObjectsWithTag("team2");
}

function Update() {
	if(attackTimer > 0f) attackTimer -= Time.deltaTime;;
	if(!distracted) {
		transform.LookAt(node);
		transform.position += (transform.forward * minionSpeed * Time.deltaTime);
	}
	
	if(enemyInRange()) {
		
		distracted = true;
		attackEnemy();
	}
	//Debug.Log("Closest Enemy: "+FindClosestEnemy().name+ " ---- Distance: " +distance);
}
var rotationSpeed2 = 7;
var moveSpeed2 = 10;


function enemyInRange() : boolean {
  enemies = GameObject.FindGameObjectsWithTag("team2tower"); 
  if(enemies.Length > 0) {
        targetEnemy = enemies[0];
        var dist = Vector3.Distance(transform.position, enemies[0].transform.position);
 
        for(var i=0;i<enemies.Length;i++) {
            var tempDist = Vector3.Distance(transform.position, enemies*.transform.position);*

if(tempDist < dist) {
targetEnemy = enemies*;*
//Debug.Log("Distance from enemy: "+tempDist);
}
}
}

if(tempDist < 5) {
* return true;*
}
* return false;*
}

function attackEnemy() {
* if(attackTimer < .1f) {*
* sendAttack();*
* attackTimer = 3f;*
* }*
}

function sendAttack() {
* Debug.Log(“Attack sent:”);*
* fireAt = targetEnemy.transform;*
* var attack = Instantiate(spellTransform,this.transform.position,Quaternion.identity);*
attack.rotation = Quaternion.Slerp(attack.rotation,
Quaternion.LookRotation(fireAt.position - attack.position), rotationSpeed2*Time.deltaTime);
attack.position += spellTransform.forward * moveSpeed2 * Time.deltaTime;

}
trying to figure out why it’s not moving.

Not sure where to begin!

The design seems incorrect. You have several transforms one being the spell transform, but it isn’t pointing to anything. You don’t locate another object to that position and rotation, you aren’t instantiating an actual spell prefab… you are creating a transform… nothing else. On top of that once you create it you set its position and rotation once and it never updates. Transforms don’t just update themselves.

You probably should start with creating a script that controls a spell, and apply it some some visual object then instantiate that. The script should then update itself each frame with where it wants to move, whether a target or a direction…