Vr light switch


Now i made it so that when my hand goes near it and i press the trigger it turns the light on, but i didnt know how to make it so when my hand isnt near it it doesnt work. How can i do that?