I have tried several different things and have failed at all of them. I have also looked around these forums, unity script reference, and unity answers with no luck. I am trying to destroy clones after a set amount of time.
This is what I tried last:
public var dodgeBall: Rigidbody;
public var ballSpeed: float = 25.0;
function Update ()
{
if(Input.GetButtonDown("Fire1"))
{
var newBall : Rigidbody = Instantiate(dodgeBall, transform.position, transform.rotation);
newBall.velocity = transform.TransformDirection(Vector3(0, 0, ballSpeed));
Physics.IgnoreCollision(newBall.collider, transform.root.collider);
newBall.timeoutDestructor = 5;
}
}