Fixed the problem
After trying some of the suggestions here, including deleting preferred networks, resetting the SMC, pRAM, repairing disk permissions and disk, I finally came to a solution because my friend @hmweinerman had the idea of deleting the preferences.plist file in the Library. To do this, you have to goto finder. Hit Go > Computer > Macintosh HD > Library > Preferences > SystemConfiguration > preferences.plist. I highly suggest copying this file and backing it up somewhere else on your computer, incase for some reasons something goes wrong, but this worked for me. Then delete the preferences.plist from that folder and restart your computer. WiFi fixed.
After trying some of the suggestions here, including deleting preferred networks, resetting the SMC, pRAM, repairing disk permissions and disk, I finally came to a solution because my friend @hmweinerman had the idea of deleting the preferences.plist file in the Library. To do this, you have to goto finder. Hit Go > Computer > Macintosh HD > Library > Preferences > SystemConfiguration > preferences.plist. I highly suggest copying this file and backing it up somewhere else on your computer, incase for some reasons something goes wrong, but this worked for me. Then delete the preferences.plist from that folder and restart your computer. WiFi fixed.