How do I replace an object on the player when it collides with an object?

There are different ways to do that and this question has been asked a few times before. Here is a thread that may be interesting for you: