I am trying to make a script that when the First Person Controller hits a plane, a new scene loads.
using UnityEngine;
using System.Collections;
public class SceneLoader : MonoBehaviour
{
function OnTriggerEnter(hit: Collider) {
if (hit.gameObject.tag == “Player”) {
Application.LoadLevel(“MyLevel”);
}
}
}
You may get help faster if you read this. HERE.
You mixed C# with Javascript.
At first, replace ‘function’ with void.
Secondly, instead of ‘hit: Collider’ write ‘Collider hit’