i have made this script and it doesnt work. what i was trying was mouse DOWN light ON and mouse UP light off
var islighton = 0;
function Update() {
if (islighton == 0 && Input.GetKeyDown ("Fire1")) {
light.intensity = 1;
}
else if (islighton == 1 && Input.GetKeydown("Fire1")) {
light.intensity = 0;
}
}
if someone can show me where i went wrong and amend it that would be great
thanks everyone