No custom scripts will work.*Using US.*

US = UnityScript.

I am a newbie, and made a basic script.

function OnTriggerEnter()
{
Debug.log(“Hiya”);
}

You know, BASIC. And when I play, it doesn’t show an error, but it DOESN’T print in the output. Now I tried some different things, like.

var health = 10;

function OnTriggerEnter(){
health - 1;
Debug.log(“You lost some health dear soul.”);
}

The 2nd script, it made a variable named health, put it to 10, but it errors out and I can’t even play the game.
How come no scripts are working? yet imported ones DO work. I use MonoDevelop.

OnTriggerEnter is triggered when a collider that is flagged as a trigger enters the collider of your script. If you want your log message to run when you hit play. Try putting it in function Start()

function Start()
{
    Debug.Log("Hiya");
}