In neuroimaging studies, multiple subject-specific brain networks can be constructed from brain connectivity measures, which comprise the networks of the brain regions connected by anatomical tracts or by functional associations. To study how the individual brain network is associated with potential factors such as demographics and clinical symptoms, we develop a network-on-scalar regression model where the response is a network and the predictors are scalars. We propose a new step function prior for the regression coefficients that enjoy both sparsity and homogeneity, leading to efficient posterior inference on variable selection and the community detection of multiple networks. We investigate theoretical properties of the proposed model and conduct simulation studies to evaluate its performance compared with existing alternatives. We apply the proposed method to analysis of functional magnetic resonance imaging (fMRI) data in the Neuroimaging of the Philadelphia Neurodevelopmental Cohort study.