How do i make the buttons work only when the player overlaps with the Box Collision

im really very new to unreal engine and have been trying out the blueprints. now in my game I can make the lantern turn on and off by pressing 1 and 2 respectively. i have a blueprint for the lantern itself with custom events and a blueprint for the switch that does the on/off logic. I want it to only work when the player collides with a box collider attached to the switch blueprint. this is my scr


ipt