My first script is like this
function Update () {
var hp = 100;
var r : float;
var color : Color = Color.white;
color.r = 0;
if (hp < 20)
{
camera.backgroundColor = color.white;
}
}
second script:
var hp : Health;
function Update ()
{
Health.hp = 1;
}
I’m trying to set the hp equal to 1 from the first script but I get the error: "Assets/Scripts/Point Hurt.js(4,11): BCE0019: ‘hp’ is not a member of ‘Health’. "
What am I doing wrong?