I havent seen the episode, but from what i read Twilight learned the spell for transform someone to another spieces at the princess old castle. so i had a what if scenario what if she accidentaly used the spell before without knowing it?. though Twilight did used some transformation spells earlier (like in the Best Night Ever), but still the joke stands that she didnt noticed what kind spell she used here
So Twilight was doing some spells at the park, but she accidentaly used a wrong spell which she didnt knew what it did. sadly my pony counterpart gout caught by Twilight magic beam unknown to her. luckly for my OC it was indeed a temporary spell.