Hi there Tyler6O,
Welcome to Apple Support Communities. We're happy to help with this trouble you're having with the internet connection on your MacBook Air. So we can clarify, exactly what happens when you connect the charger? Does the network connection drop completely, or are you still connected but no longer have internet access? You can try resetting the system management controller (SMC), as this is good to resolve most lower level performance issues. Follow the steps here to do so:
How to reset the SMC of your Mac
We look forward to hearing back from you.
Have a great day!