An animal's decision to accept or reject a prospective food is based only, in part, on its chemical composition. Palatability is also greatly influenced by textural features including smoothness versus grittiness, which is influenced by particle sizes. Here, we demonstrate that Drosophila melanogaster is endowed with the ability to discriminate particle sizes in food and uses this information to decide whether a food is appealing. The decision depends on a mechanically activated channel, OSCA/TMEM63, which is conserved from plants to humans. We found that tmem63 is expressed in a multidendritic neuron (md-L) in the fly tongue. Loss of tmem63 impairs the activation of md-L by mechanical stimuli and the ability to choose food based on particle size. These findings reveal the first role for this evolutionarily conserved, mechanically activated TMEM63 channel in an animal and provide an explanation of how flies can sense and behaviorally respond to the texture of food provided by particles.