I need help please - State Common Events Issue

Hey I'm trying to add something cool to my hero, he is supposed to use a skill that changes the attribute of his attacks and unlocks a special skill while the state lasts. But I also want my hero's SV sprites to change to reflect the elemental atribute he is changing to ->JUST WHILE THE STATE LASTS<- theres where my Issue starts. I was trying to solve that with paralel common events, tried different combinations and it just works when the state gets into play, the character changes its sprites properlly.
But when the state gets removed its sprites remain the elemental ones instead of returning to his original sprites.

I wanted to solve this by getting a plug-in that allows me to call common events when a state enters into play and when it gets removed and I found this one: https://forums.rpgmakerweb.com/index.php?threads/state-common-events.57853/
But for some reason by just activating that script I get the error: "Type Error: Undefined is not a function." (This is the only plugin I have installed right now so its definitely not the load order.)

I want to know if theres a way to solve that error, or if there is another MV plugin like that one that can help me or if there's actually a way to do what I'm trying to do without plugins.

I would appreciate your help. 🙁
The most common reason for that particular error message is that you tried testing it using an existing save file. For most plugins it is necessary to start a New Game play test, as the new plugin will be calling on data that is not included in an existing game, so it crashes.
I tested it using the battle test button on the troops manager.

I also tried starting a new game but just by hitting the playtest button window just shows up with that error message.

Original thread: https://forums.rpgmakerweb.com/threads/i-need-help-please-state-common-events-issue.85331/