I used this code in the signal of area2d, body_entered(node: body)
I don't know why it doesn't work, please help. It says "non exsitent function "get name" in base "Nil".
func _on_potion_body_entered(body : KinematicBody2D):
if (body.get_name() == "blue"):
Global.blue_tele = true
elif (body.get_name() == "yellow"):
Global.yellow_tele = true