[SOLVED]On Key Light Intensity - Help

Hi guys. I created a script for my flashlight and it’s basiclly changes the intensity of the light on a key pressed like “F”. I created this script but it’s not working and i don’t have any errors. I hope you guys can help. Thanks!

#pragma strict
//Long is Uzun, short is Kisa...
var Kisa : float= 1;
var Uzun : float= 5;

function Update ()

{

if(Input.GetKeyDown(KeyCode.F));
light.intensity = Uzun;

if(Input.GetKeyUp(KeyCode.F));
light.intensity = Kisa;
 
}

Lol, i just solved it :smile:

If you have the same problem just do this:

if(Input.GetKeyDown(KeyCode.F)){
light.intensity = Uzun;
}