When I am practicing sweeps certain fret like the 12th fret keep ringing a note after being played. I don't think i am muting the strings properly. I've looked online for the best technique but haven't really found anything very helpfull.

Thanks in advance.
I will shred in the end!!
If it's only certain frets then it's your guitar not you... Give it a proper set up and you should be okay.
Gear List:
B.C. Rich NT Jr. V (With Seymour Duncan AHB-1 Blackout in bridge)
Electro-Harmonix Metal Muff
Marshall MG15DFX
Jazz III picks
DR strings
Planet Waves Cables
It's not your guitar. Notes on 7th, 9th, 12th, 15th,... etc fret ring out, because those are the places where you find natural harmonics.
You are correct; you are not muting them correctly. Especially an arpeggio like:


is quite difficult to play cleanly on high gain. Just practice slowly, and with time you'll get it down.