using UnityEngine;
using System.Collections;
public class Sword : MonoBehaviour {
var totalhealth = 100;
function OnTriggerEnter(other : Collider){
if(other.tag == "angelic_sword_02"){
totalhealth -= 50;
}
}
function Update(){
if(totalhealth <= 0){
Destroy(gameObject);
}
}
}
I get an "Identifier Expected" in the script where it says in the line
function OnTriggerEnter(other : Collider) {
Any help please?