Glucosyltransferases (Gtfs), represented by GtfB and GtfC, are important virulence factors of Streptococcus mutans and the major etiologic pathogens of tooth decay. However, the individual roles of gtfB and gtfC in the initial attachment of S. mutans are not known. We used atomic force microscopy to explore the contribution of gtfB and gtfC, as well as enamel‐surface roughness, on the initial attachment of S. mutans. Adhesion forces of four S. mutans strains (wild‐type, ΔgtfB, ΔgtfC, and ΔgtfBC), onto etched enamel surfaces, were determined. Force curves showed that, with increasing etching time from 0 to 10 s, the forces of all strains increased accordingly with acid‐exposure time, the adhesion forces of wild‐type strains were significantly greater than those of mutant strains (p < .05), and the forces of the three mutants were similar (p < .05). When the etching time was increased from 10 to 30 s, difference in force between 20 and 30 s was not observed, and adhesion forces among ΔgtfB, ΔgtfC, and wild‐type strains were not significantly different when the etching time was >20 s (p > .05). These data suggest that the roughness and morphology of enamel surfaces may have a significant influence upon the initial attachment of bacteria, and that gtfB and gtfC are essential for the adhesion activity of bacteria. Furthermore, gtfB seems to be more important than gtfC for bacterial‐biofilm formation, and gtfB inactivation is an effective strategy to inhibit the virulence of cariogenic biofilms.