From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
Purple Klaptraps debut in the SNES version of Donkey Kong Country, appearing in a Trick Track Trek bonus level and Loopy Lights. They jump at the same time as Donkey Kong and Diddy Kong making them dangerous enemies. They are brown in the GBC version and red in the GBA version.
Purple Klaptraps later reappear in Donkey Kong 64, first appearing in Jungle Japes and are found in several areas. Purple Klaptraps are immune to all direct attacks that the Kongs have, even being completely immune to the Kongs' shock wave attack; using it will just hurt the Kongs, while the purple Klaptrap is unaffected.
Fortunately, purple Klaptraps can be defeated by blowing them up with an orange, or by using a musical instrument. When defeated, a purple Klaptrap will leave three oranges behind.
Because the purple Klaptraps are immune to all direct attacks, the teeth of purple Klaptraps will never leap from their bodies and attack the Kongs whenever they're defeated.
Red Klaptraps also appear in certain cutscenes of Donkey Kong 64, predating the GBA version of Donkey Kong Country.