MZ Help with Visustella

I am trying to make a few types of states, but the main one is where it once the state is removed, it adds a different one, but no matter what, I cannot get it to work
Please show how you set it up to do this. It will make it easier for others to identify any mistakes you've made.
Are you using this notetag?

<JS On Expire State>

user.addState(x)

</JS On Expire State>

where x is the new state
It worked, Faroutfighter, thanks!
It worked, Faroutfighter, thanks!
Yaaaaay! Thank Chat GPT as well, I got the answer from it

Original thread: https://forums.rpgmakerweb.com/threads/help-with-visustella.157702/