So I’m attempting to make a coil gun powered by Lipo batteries. However, when I connect the battery there is a short high voltage spike that kills the mosfet, which is rated for 40v, and the battery is 2 4s lipos in series (should be 32 volts max). How can I prevent this spike when connecting the battery? The circuit is just a mosfet that powers a coil from the battery.