Hi i need help. I have a spotlight and im using it as a flashlight and I cant seem to turn it off when I press a button. Here is my code. Thanks!! (Also use c#)
` if(flashlightDead == false){
if(Input.GetKeyDown("f")){
if(lightOff == false){
lightOff = true;
light.intensity = flashlightOff;
}
if(lightOff == true){
lightOff = false;
light.intensity = flashlightOff;
}
}
}`