Get actor component in Level Blueprint

Greetings everyone!

I’m trying to toggle on/off a flashlight in my level. Here is an image of the thing;

I started from the VR preset in which there are cubes you can pick. I switched the cube to a flashlight model.
I added a spotlight as a component in the viewport of the blueprint editor of the BP_PickupCube and I can see the spotlight as a variable as such;

Now, I just want to set the light visibility to On when i press a button but I can’t drag the variable Flashlight to the level blueprint because it says that it cannot place variable in external scope. I can only drag the BP_PickupCube and it’s not what I want;

I tried this Direct Actor Communication Quick Start Guide | Unreal Engine Documentation But I can’t seems to make it work. What would be the best technique to make it happen?

Thank you for your time!

You should be able to get components by name.

Make sure you compile your blueprint after you add new component though.

Wow, it was that simple! Thank you a lot!

No problem! Happy to be helpful here! Don’t forget to accept the answer for searching purpose;)