We consider the contribution of scalar resonances to hadronic light-by-light scattering in the anomalous magnetic moment of the muon. While the $f_0(500)$ has already been addressed in previous work using dispersion relations, heavier scalar resonances have only been estimated in hadronic models so far. Here, we compare an implementation of the $f_0(980)$ resonance in terms of the coupled-channel $S$-waves for $gamma^*gamma^*to pipi/bar K K$ to a narrow-width approximation, which indicates $a_mu^{text{HLbL}}[f_0(980)]=-0.2(2)times 10^{-11}$. With a similar estimate for the $a_0(980)$, the combined effect is thus well below $1times 10^{-11}$ in absolute value. We also estimate the contribution of heavier scalar resonances. In view of the very uncertain situation concerning their two-photon couplings we suggest to treat them together with other resonances of similar mass when imposing the matching to short-distance constraints. Our final result is a refined estimate of the $S$-wave rescattering effects in the $pi pi$ and $bar K K$ channel up to about $1.3$ GeV and including a narrow-width evaluation of the $a_0(980)$: $a_mu^text{HLbL}[text{scalars}]=-9(1)times 10^{-11}$.