Toggle light visibility with Input Action

Will that work outside the Level Blueprint? I want to use a self contained blueprint for this…