JavaScript: Throwing problem!

Hey guys I was wondering if you could help me on this! I am having a bit of a problem with this script and I’m really new to JavaScript. I wanted to throw an object when I press a button. But when I play the game to test it spawns hundreds automatically without pressing anything. Also it’s saying that it doesn’t understands what I mean by “Play” when I say “AnimationClip.Play(Anim);” . Help anyone? Thanks! :smiley:

#pragma strict
var tossobj : Rigidbody;
var Sound : AudioClip;
var Anim : AnimationClip;
var throwpower : float = 10;

function Update () {
	var clone : Rigidbody;
	clone = Instantiate(tossobj, transform.position, transform.rotation); 
	clone.velocity = transform.TransformDirection(Vector3.forward * throwPower);

AnimationClip.Play(Anim) Should be Animation.Play(“youranimationname”);