[FIXED] Score generator


I am making a small project which you can buy powerups that generate score for you. Like Cookie Clicker. But I can’t make it give me the score. If you can help me, please tell me how!

My code for the score generator:

var cookieGenerateAmount : float = 1;
var timer : float = 1;

function Generate () {
		yield WaitForSeconds(timer);
		Score.score += cookieGenerateAmount;

You need to call Generate() somewhere to start it working:

function Start() {