Create the goal line by making a New Scene with Area2D as the Root and renaming it to Goal.
The goal is an invisible line so we only need to add a CollisionShape2D with a New RectangleShape.
Scale of the CollisionShape2D so that it is much taller than the board height.
Add a New Script to the Goal and create a custom signal called point_scored
Now connect the body_entered signal of the Goal
Write code that will execute if the body which entered the goal is in the group called "Ball".
Return to the Ball Scene.
Open the Groups submenu in the Node tab
Add a new group called "Ball" make it global.
Now when the ball enters the goal, the goal will emit the points_scored signal.
Return to the Board Scene
Add a LeftGoal and a RightGoal.
Next we will create the User Interface so that we can see the scores.