https://docs.godotengine.org/en/stable/getting_started/first_3d_game/07.killing_player.html
Killing the player — Godot Engine (stable) documentation in English
We can kill enemies by jumping on them, but the player still can't die. Let's fix this. We want to detect being hit by an enemy differently from squashing...
killing the playergodot enginestabledocumentationenglish