I was working on a project when I realised that the function on body entered didn't work. So i created a new project to test what was wrong but I couldn't fix the problem. I created 2 RigidBody2D nodes and each of them contained a Sprite node and a CollisionShape2D node. Can someone tell me what causes the function to not work?
The script I attached to one of the RigidBody2D nodes: