transform.rigidbody.AddTorque??

I get this error message:

I want to create a diamond from a GameObject’s position, and make it spin.

var nextCreateTime = 0;
var Diamond : Transform;

function Update () {
	if(Time.time > nextCreateTime)
	{
		var newdiamond : Transform;
		newdiamond = Instantiate(Diamond,transform.position+(Random.insideUnitSphere/10),Random.rotation / 300);
		newdiamond.rigidbody.AddTorque(Random.rotation);
		nextCreateTime = Time.time + 10;
	}
}

How do I acccess the new instance’s rigidbody so I can give it some torque?

random.rotation returns a quaternion and you want a vector3 for addTorque

Great!! I never seen something work so gracefully!

I would have never figure that out on my own, I need to learn what a quaternion is, I thought rotation should have been defined by a Vector3, weird huh

quaternions are a way to deal with 3d rotations using imaginary numbers - i dont attempt to understand them but you can read the wiki if you want