Hello. In my game, you can enter a wardrobe and you can change your character's sprite. It works accordingly except for the part where you move and the sprite inmediately changes to the original. This is the link to the original script:
I suspected that maybe this was because of the script changing the MC's sprite to the one that they're suppossed to have according to their name in the database. So I made it so that when you change sprites, it also changes your name, and I added a new line so that the sprite applied to the MC's new name was the new one, and I also made an idle animation for that sprite. However this didn't work either, the same issue happened: everything goes right until you move, and your character goes back to the original sprite. This was probably because I'm new at Ruby and I didn't write the code right, but it didn't throw any error. By the way, I know it is the script because when I take it out changing the MC's sprite works perfectly.
Hopefully I explained myself well enough.
I suspected that maybe this was because of the script changing the MC's sprite to the one that they're suppossed to have according to their name in the database. So I made it so that when you change sprites, it also changes your name, and I added a new line so that the sprite applied to the MC's new name was the new one, and I also made an idle animation for that sprite. However this didn't work either, the same issue happened: everything goes right until you move, and your character goes back to the original sprite. This was probably because I'm new at Ruby and I didn't write the code right, but it didn't throw any error. By the way, I know it is the script because when I take it out changing the MC's sprite works perfectly.
Hopefully I explained myself well enough.