(KXAS) -- Fort Worth police have arrested and charged a man in connection with an attempted shooting at a McDonald's that was apparently averted when the suspect's gun malfunctioned.

Surveillance video shows Jestin Anthony Joseph pulling the trigger on the gun several times after attempting to rob customers and employees Tuesday night, police said. The gun malfunctioned and did not fire.

Joseph entered the McDonald's located at 4800 South Freeway in Fort Worth just after 9 p.m. and asked a cashier for a water cup, police said. He then walked over to the water fountain, where witnesses said he was mumbling to himself before showing his weapon.

Joseph is being held in the Mansfield Jail on five charges of aggravated robbery with a deadly weapon. His bond is set at $500,000.