Play Audio-Clip On Ray Casting Collision

Howdy, would anybody be able to tell me how adapt my existing script so that an Audio-Clip will play on the ray cast collision. I've spent all day butchering my existing code trying to achieve this but I've got nowhere with it. Here it is in working order, minus any audio elements:

function Update()

{
var hit : RaycastHit;

//check if we're colliding
if(Physics.Raycast(transform.position, Vector3(transform.forward.x, -0, transform.forward.z), hit, 10)
)
{
//...with a plane
if(hit.collider.gameObject.tag == "orangeplane")
{
//change colour!
hit.collider.gameObject.animation.Play("orange");
}
}
}

Any suggestions on how to achieve this will be greatly appreciated, Will.

Read the AudioSource script reference.

Add an Audio Source component to the object you want to emit the sound from. Then, reference the Audio Source from your code, and call the function `PlayOneShot();`. This will play the sound file you've loaded into the Audio Source once in your scene at the object's position.