Raycast destroy not working

I have set up my code perfectly I cannot see where it is wrong at all. I am making a slender game and I am using a raycast for collecting papers. It adds a paper and knows it is hitting paper but the paper won’t destroy.

var hit : RaycastHit;
       if ( Physics.Raycast( ray, hit, distanceToPaper ) )
       {
         if ( hit.collider.gameObject.name == "Paper" )
         {
          papers += 1;
 
          audio.PlayClipAtPoint( paperPickup, transform.position );

          Destroy (hit.collider.gameObject);

um, is that your whole code? well try this:

var rayCastLength = 5;
 
      function update() { var hit : RaycastHit;
      if (Input.GetButtonDown("Fire1"))

{
if(Physics.Raycast (transform.position, transform.forward, hit, rayCastLength))
{
if (hit.transform.tag == “Paper”)
{
papers += 1;
Destroy(hit.gameObject);
//I don’t know what your trying to do with the audio
}
}
}