Turret Issues

No matter what I try, it won’t shoot properly, I’ve tried the tornadoTwins tutorial but I just get errors. I’ve been working on this for about 3-4 hours and I just can’t get it. I’ve tried making the Projectile object itself shoot forward, but then, it always goes along World X. and I’ve tried doing so in the turret script, but then the projectile just falls to the ground -.- . heres my script for the turret. (I’d continue troubleshooting myself, but I’m fairly new to scripting (Took a C++ class in HS but thats about it). besides I have set myself a schedule and do not wish to get behind.)

=============================================

var LookAtTarget : Transform;
var damp = 5.0;
var fireBall : Transform;
var savedTime = 0;

function Update()

{
	if(LookAtTarget)
	{
		var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position);
		
		transform.rotation = Quaternion.Slerp(transform.rotation, rotate, Time.deltaTime * damp);
	//transform.LookAt(LookAtTarget);
	
		var seconds : int = Time.time;
		var oddeven = (seconds % 2);
		
		if(oddeven)
		{
		Shoot(seconds);
		}
	}
}

function Shoot(seconds)
{
	if(seconds!=savedTime)
	{
		Instantiate(fireBall ,transform.Find("spawnPoint2").transform.position ,Quaternion.identity);
		fireBall.rigidbody.AddForce(transform.forward * 1000);
		savedTime=seconds;
	}
										
}

========================================

Regarding the ‘falling to the ground’ part, have you tried disabling gravity for the rigid body in question? (Also, if your intention with the AddForce() call is to give the projectile an initial velocity, be sure to submit ForceMode.Impulse for the ‘mode’ argument.)

Thanks, but I got it to work, I’ll post the code to help anyone else in the future.

var LookAtTarget : Transform;
var damp = 5.0;
var fireBall : Transform;
var savedTime = 0;
//Should have made Side-notes while I wrote/modified this
function Update()

{
	if(LookAtTarget)
	{
		var rotate = Quaternion.LookRotation(LookAtTarget.position - transform.position);
		
		transform.rotation = Quaternion.Slerp(transform.rotation, rotate, Time.deltaTime * damp);
	//transform.LookAt(LookAtTarget);
	
		var seconds : int = Time.time;
		var oddeven = (seconds % 2);
		
		if(oddeven)
		{
		Shoot(seconds);
		}
	}
}
//This here causes the Projectile to fire
function Shoot(seconds)
{
	if(seconds!=savedTime)
	{
		var bullet = Instantiate(fireBall ,transform.Find("spawnPoint2").transform.position ,Quaternion.identity);

//Forces Forward Motion upon fireBall		bullet.rigidbody.AddForce(transform.forward * 1000);
		savedTime=seconds;
	}
										
}

Thanks again though for the quick response.