I have the flame turning on and off just fine. It sets PlayLightOnCheck to 1 whenever it’s on. Then I call the FlameDur function which is supposed to be counting how long it’s been on for, and every ten seconds taking 2 points off the FairyHP.
The FairyHP is getting the health points from a separate script with its health points there, that’s working fine.
It’s just not counting up to 10, taking off points, restarting count, getting to 10 remove points… etc.
When I’m turning the candle on, it’s just saying how long it’s been since the game started.
In the FlameDur I just put in what you suggested just now. I’ve had a while loop in there, I’ve had a for loop. I’ve tried recording flamestart, then when the candle is on: flametime = Time.time - flamestart
I’m kinda new to coding, so I’m embarrassed showing my script but here goes 
private Light flame;
public static int PlayLightOnCheck = 0;
public float flametime = 0;
public float maxtime = 10;
public int FairyHP;
public float flamestart = 0;
void Start ()
{
flame = GetComponent ();
}
public void PlayerLight ()
{
if (flame.enabled == true) {
PlayLightOnCheck = 1;
FlameDur ();
} else {
PlayLightOnCheck = 0;
flametime = 0;
flamestart = 0;
}
}
void Update () {
FairyHP = Fairy.fairyhealth;
if (Input.GetButtonDown (“Candle”))
{
flame.enabled = !flame.enabled;
flamestart = Time.time;
PlayerLight ();
}
}
public void FlameDur () {
flametime += Time.deltaTime;
if (flametime > maxtime)
{
FairyHP -= 2;
}
}
}