So i was trying to make a light switch with an actor blueprint with a widget component. I am able to press it but how do i make it change the visibility of the light i tried this but it didn’t work
To switch the light you need to access the actual light component visibility, not just the root component (unless root component IS the light source).
In this case I assume hierarchy in your bluerpints looks something like:
Root:
MeshComponent
LightComponent
You might pull your light component and make it root, this way you would not need to change your code, otherwise instead of root try to get light component from the Lights actor.
If that doesn’t help make sure the Get Actor of Class node returns correct actor.