Crashing at the second gym leader

sorry if this is lengthy… My game is crashing whenever i go to battle the second Gym leader. I had battled him multiple time before, but a friend had asked to battle instead. i figured I needed a break, so i agreed… the online battle wasn’t working 100% so we figured we’d move to the Battle Simulator for the game. i tried to export one of my pokemon to a file from the game files, and my laptop crashed and had to restart (this is the first time a game has ever caused my computer to restart, and this is most certainly not the most demanding task I’ve asked a game to do.) I then turned my laptop back on and just decided not to battle my friend since it wasn’t going smoothly. i started back up my game and decided to give the second gym another shot. i went through all the dialog, and we had walked to the battling area, and the game froze… after a few seconds a message along the lines of “the script is too low, try turning off battle animations if your computer sucks, if it was during online functions the server may be down” (i summarized a bit) i tried deleting my main save and using the latest backup to receive the same issue at the same point just frames before the battle… i did try turning off animations and it didn’t help. If anyone has a solution, or anything i could try let me know.

I wont delete the post in case anybody has a similar issue, but i did fix the problem (not entirely sure how) after waiting a day i decided to battle the level trainer in my secret base… after one battle there i could again battle the second gym leader with no problems!

The fix to this issue is you have turn off the wifi on your computer. It’s the weirdest fix but it works I promise you that.