(CNN) Kansas Republican gubernatorial candidate Kris Kobach rode in a parade on a jeep mounted with a large replica of a gun, sparking backlash from people attending the event in Shawnee.

The streets of the Kansas City-suburb were lined with families as he made his way through the parade, waving to the crowd from the vehicle painted with the colors of the American flag.

"Had a blast in the Old Shawnee Days Parade in this souped up jeep with a replica gun. Those who want to restrict the right to keep and bear arms are deeply misguided," Kobach tweeted.

"The only thing that stops a bad guy with a gun is a good guy with a gun."

Kobach, the state's secretary of state, is facing several candidates, including Kansas Gov. Jeff Colyer, in the race for the Republican gubernatorial nomination.

Read More