Area2d node and then add
Area2D and set a shape of your choice.
Area2D can detect object entered its area.
KinematicBody2D and set its shape.
Then add your player to
Now go to your enemy scene, select
Area2D node and connect signal
body_entered(body : Node)
Then use this code
#this function is called when any body enters this area
#confirm that the body is player
#call kill , assuming that you have defined kill function for player