Scene Audio Script Error

Ok so I have a on collision play audio next scene script but the audio isn’t playing. Can you help?

var levelToLoad : String;
var isQuitButton = false;
var select : AudioClip;
var choose : AudioClip;

function OnTriggerEnter(hit : Collider)
		//load level

The issue is the first line in the file… you are trying to declare a variable but you are calling a function. I’m not sure what it is exactly that you’re trying to do.

Application.LoadLevel() is a static function that takes a single argument that is the name, or ID, of the level you want to load. I presume that it is the level you want to hold in a variable. Yes?

So… in that case…

var currentLevel = "1";

Application.LoadLevel( currentLevel );

Here is my error:

(1,16): BCE0043:Unexpected token: …

var Application.LoadLevel(“1”);

Error tells you whats wrong. LoadLevel is a function, but you are trying to use it like a variable. Comment out the first line.

To answer your new question… The var choose is either undefined or your Colliders aren’t triggering correctly.