Williams, 41, stopped by Jimmy Kimmel Live! on Wednesday evening, May 7, and engaged in a fierce competition with the talk show host, 46.
Kimmel challenged the "Happy" singer to a "Twofie Shootout," where each star hit Hollywood Boulevard and tried to take as many selfies with strangers on the street as possible in 30 seconds.
The late-night funnyman counted a total of 10 twofies and got a cameo from Darth Vader, who was posing on the boulevard.
Williams kept it cool, moseying along the street and snapping a total of six twofies.
Watch the hilarious video of Kimmel and Williams above!
Sign up now for the Us Weekly newsletter to get breaking celebrity news, hot pics and more delivered straight to your inbox!