All three were arrested after the victims called police. There were no injuries.
Two of the intended victims fled, and the third turned over an undetermined amount of cash after one of the robbers activated the stun gun so the victim could see the electrical flash, police said.
The attempted robbery occurred on Wateredge Avenue and Parkview Place in Baldwin about 10 p.m., police said, but the three intended victims fled and called police.
At 10:15 p.m., the trio robbed three other teens at Knollwood Avenue and Lakeview Avenue in Rockville Centre, getting away with a cash and a cellphone, police said.
The victims in the second robbery had given police a description of the robbers, who were arrested at Grand Avenue and Church Street in Baldwin at about 10:45 p.m., police said.
Tristan Bryan, 18, of Miller Place; Scheno St. Julien, 19, of First Place; and Andy Amazan, 18, of Seaman Avenue, were charged with several counts of robbery in the first degree and related charges, police said.
Arraignment information was not available.