Player gets deleted immediately, even if not interacting with Area2D.

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

I’ve been working on a small game to help me practice designing a top down shooter.
I have a small room set up with an enemy and a player. they’re both about 128p apart when the level starts.
The enemy has two arms (area 2Ds and collision shapes), that when the player enters them, will queue_free() the player. My issue is, when the level begins, the player gets deleted immediately. I’m not sure where I’m going wrong, and yes, the collision shapes and area 2Ds are correctly proportioned.
I’ve looked everywhere and haven’t found any solutions. Here’s the code: The code I used

Link to the Image if it doesn’t work.

Nvm, I’m dumb. I just had to queue_free() when the player class was touching it, not whenever. The code

OiKeTTLe | 2021-04-21 01:16