The Particle system bugs out in character animation timeline

Hi! I am trying to learn 2D Animation in unity3d. I made a running animation which went all fine. Then i created a new gameobject and created a particle system inside of it. Then i asked Chatgpt for help and it gave me a script so that i can include my particle system inside my 2D running animation. I did as Chatgpt told me and so far for 1 particle system it works perfectly. There is literally 0 problems about it. However that is true only if it is just one particle. When i try to add a second animation event and add a second particle system using that second animation event inside my 2D runnin animation timeline. It bugs out. The video: https://www.youtube.com/watch?v=vtSVkTbqrHA ------- The script: code - Pastebin.com