Making pickup able items

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By toivocat

So I am making a game it’s all dark and you have this little thing of light around you it’s 2D and I have all the lights working including the torches but I need to know how to make it so if you press space and your standing on a torch you pick it up then if your holding the torch and you press enter you put it down where your standing. The way I want to do this is change the player node to a different one. What I mean by that is so I have two scenes and I want it so if your over a torch and you press space it hides the torch, and changes the player scene (without the torch) into one holding a torch and when you press enter it unhides the torch (in the players current location) and changes the player with the torch player scene into the one not holding the torch. Could someone help me do this?