Here is my script, i still can’t get the hit detection to work, and now I am having this problem.
using UnityEngine.SceneManager;
function OnTriggerEnter (col : Collider) {
Debug.Log(col.gameObject.name);
if(col.gameObject.name == "Key");
{
SceneManager.LoadScene(0);
}
}