I have tried to print the return value of the Linetrace and the result is always true. I think it’s because the wall behind the switch is already hit by the linetrace.
It should be working if the Linetrace can ignore the other objects like the wall, but I don’t know how to make that.