extends StaticBody export(Array, NodePath) var connectedLights : Array var lights = [] func _ready(): for path in connectedLights: lights.push_back(get_node(path)) var on = true func interact(_relate): if on: on = false for light in lights: light.hide() else: on = true for light in lights: light.show()