Hi, I wanna make a gui so that detects if a light is at 0 intensity, and if it is at that then it displays a text box saying “press f to turn on flashlight” cause its a dark room and da player would want to know they have a flashlight and how to turn it on, anyway here is the javascript i made but it says “It is not possible to invoke an expression of type ‘float’.” which i dont know how to fix since i am noob at scripting:
function OnGUI () {
if (light.intensity (0));
(GUI.Box (Rect (10,10,200,20), "press f to turn on flashlight"));
print("flashlight on");
}
thanks in advance!