Schooling is essential to the biology of a diversity of fishes, but it is unclear how this behavior is mediated by different sensory modalities. We manipulated ambient light and the lateral-line system to respectively test the roles of vision and flow sensing in the kinematics of schooling. These experiments were enabled by automated tracking of large schools (>100 fish) though the development of a schooling arena for high-contrast and high-resolution videography. We found that fish could not school in the dark, but did attempt to follow one another. Compromising the lateral line with an antibiotic treatment caused tetras in the light to swim less cohesively and to fail to follow in the dark. Therefore, vision is both necessary and sufficient for schooling and flow-sensing enhances school cohesion. These results offer a basis for understanding for the sensory basis of schooling.