To add a moving platform to the game, follow the steps below:
1. While the "game" tab is selected, drag the "scenes/platform.tscn" file from the "FileSystem" tab and drop it to the left side of the scene.
2. While the "Platform2" Node is selected, create a new Node by clicking the + sign under the Scene tab or by pressing the Ctrl-A key combination.
3. In the Create New Node window that appears, search for and select AnimationPlayer in the Search line and click on the Create button.
4. While the "AnimationPlayer" Node is selected, click on the "Animation" statement in the window below the Godot development environment and select the "New" option.
5. In the window that appears, write "move" in the box and click the OK button.
6. While the "Platform2" Node is selected. Under the "Inspector" tab, in the "Transform" content, click on the key icon on the right side of the "Position" line.
7. In the box that appears, click the "Create" button.
8. Make the following arrangements:
When you click the Run button, the animation plays. When you click the Loop button, it goes from the beginning to the end, and when it reaches the end, it goes back to the beginning and continues. When you click the same button again, when the Platform reaches the end, it moves backwards and comes back to the beginning.
9. Make the following adjustments:
The animation window image will be as follows.
10. Save the scene with Ctrl-S and run the game. The platform constantly moves between two points.