I am attempting to make a mod to allow the player to transform into a custom race and back again(similar to vampire lord and werewolf). I tried using the werewolf and vampire lord spells as reference, but I don't really get how they work. I have gotten a spell made that successfully transforms my character into the custom race and even equips some custom items that I want equipped. However, I can't get the revert spell to work, so the character becomes stuck as the custom race aside from using console commands. Any tips on how I could make a proper revert spell? I'm generally able to understand LUA with some explanation, but I'm no expert in it. I also feel like my transform spell is a bit janky and/or outdated, but that's a different problem for another day.