I don't know why my script is not working.

I am trying to make a lighter light after you click the right mouse button a random number of times. Here is the code.`#pragma strict

var numberOfFlicks = 0;
var amountOfFlicksNeeded = Random.Range(3,6);

function Start () {
%|528093017_1|%
%|-655359690_2|%
%|1834204514_3|%
%|-607775795_4|%
}

function Update () {
%|1867059940_1|%
%|-1155316282_6|%
%|-850137141_7|%
%|749300002_8|%
%|337335241_9|%
%|-268686471_10|%
%|1598370192_11|%
%|1294178498_12|%
%|878478112_13|%
}
function Flame () {

%|1217112751_14|%
%|-988769305_15|%
%|967961489_2|%
%|-1688485115_17|%
%|-1234095750_18|%
`

  1. You set numer of flicks needed to 1 at 1st line in Update function.
  2. i’m not into JS but i think that you define the variable multiple times inside update and start function. OK checked it and i’m right.
  3. just remove “var” from your start and update functions (they were defined as local variables).