How do i change a sprite using a collectable

Hi, i’m trying to make a sprite change to another sprite using a collectable, but i cant find a way to do this, can you help me?

Can you give a little more information about the function of the sprite? Is it controlled by the player and does it have multiple animations?

I’m trying to make it so that when the sprite colides with the collectable, it will turn into another sprite, kinda like Mario, but my way

So my question still remains - does the sprite have multiple animations? The answer will influence the solution.

you mean the sprite the game starts with, if so, it has a idle animation, if youre talking about the other sprite i referred as the sprite to change to, i havent made it yet, im just asking how do i make a sprite change into another using a collectable

I mean the original sprite, the one you are changing from. As well as idle, does it any other animations, like run, attack, jump etc?

If it does, then you’ll need to create another sprite object for the second sprite. When it comes time to change sprites, create an instance of the second sprite at the position of the first one (maybe set any other attributes like rotation, whether it’s flipped, scale) and then delete the first sprite.