Add to cart option visibility conditions


I am creating a website to sell some doggy items. I am trying to set the visibility condition of one of the options in add-to-cart to only be visible if customer selects a certain option in the previous field. I have tried using ‘Visibility Condition’, but it did not work. How do I set visibility condition in the add to cart option?