Line Trace

Hi guys just wounding How can i use the Line Trace to allow me to let the player turn on and off lights only while looking at the switch i have the following so far:

Any help would be great