I cant fix this error, and im new to scripting and coding in general, so if you could treat me like i am a complete idiot(Which i wouldn’t deny in the field of coding)that be great.
THE ERROR- Assets/DamageTrigger.js(6,20): BCE0018: The name ‘Widget_Status’ does not denote a valid type (‘not found’).
//DamageTrigger.js: A simple, variable damage trigger that can be
//applied to any kind of object.
//Change the damage amount in the Inspector.
var damage: float = 20.0;
var playerStatus : Widget_Status;
function OnTriggerEnter(){
print("ow!");
playerStatus = GameObject.FindWithTag("Player");
GetComponent(Widget_Status);
playerStatus.ApplyDamage(damage);
}
@script AddComponentMenu("Environment Props/DamageTrigger")