this is my script i am making a menu at the beginning of my game with two button's play game, and quit game. it highlights when i go over it and when i take my cursor off of it the highlight goes away thats not my problem. i set a sound to when you click on the button but it doesnt play. the script doesnt work either i keep getting errors. please help?! thank you in advance
// set this to your sound in the inspector
var crashSound : AudioClip;
var isQuitButton : false;
function OnCollisionEnter (collision : Collision)
{
// next line requires an AudioSource component on this gameobject
audio.PlayOneShot(crashSound); }
function OnMouseEnter()
{
//change the color of the text
renderer.material.color = Color.green;
}
function OnMouseExit()
{
//change the color of the text
renderer.material.color = Color.white;
}
functiom OnMouseUp()
{
//are we dealing with a quit button?
if(isQuitButton)
}
else
{
//load level Application.LoadLevel(1);
}
}