1. Attaching the Script

-In the Scene panel, right-click the inner player (CharacterBody2D) node.

-Click Attach Script (or click the script icon next to the node).

-Path: Set the path to res://scripts/player.gd.

-Click Create.