extends SpotLight func _input(_event): if Input.is_action_just_pressed("toggle_flashlight"): toggle() func toggle(): visible = not visible $AudioStreamPlayer.pitch_scale = rand_range(0.5, 1.2) $AudioStreamPlayer.play()