How can I make a block that will kill my player and the player will respawn

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

So, I am new to game development. tbh I’m new to GDScript. So I am making this platformer where there will be a lava pit under the floating grounds and if the player falls in the lava the player will die. But I can’t figure out how to kill the player if the lava is touched and how to make the player respawn at the starting point of the game after they die.

:bust_in_silhouette: Reply From: deaton64

That’s quite an open ended question.
If it’s an node object, you can free it and it will vanish. You can then create a new node object.
Or you can move it off screen, have it die, move it back…

Maybe watch a platformer tutorial ?