- Edited
I have created a game(Coin Dash from a book). There is a Area2D player node in the main scene. And also there are coins and obstacles as Area2D node. Both of the nodes has appropriate CollisionShape2D as their child. So in the main scene, I have implemented the signal on_Player_area_entered like this,
Here my obstacle Area2D node is in group "obstacles" and coin Area2D node is in group "coins". The game runs. When I touch coins, the pickup works prefect. But when I touch obstacle with my player, the game pauses and the runtime error shows up like the image below,
I have been trying to make my obstacles work for hours. But haven't become successful identifying what is causing the error to happen. Can you help?