Make sure you attach a script to the Sprite node, before you connect the signal
This can be done by right clicking the node and clicking Attach Script
thanks but it already has a script it has the symbol thing for the script and when i play it it can move using the arrow keys
nukzhy | 2022-04-18 09:34
Based on your images there is no script on the Sprite node. The script icon should look like the paper/scroll you see here.
The icon in your image indicates that the sprite is a different scene. If the sprite scene contains the script, you first need to expose its children by right clicking and checking “Editable Children”. But this is not how it’s done in the tutorial.
Can you show me where in your scene the script (paper icon) is attached?
Ninfur | 2022-04-18 13:08
now there is a icon that is missing supposed to have this in the tutorial is the tutorial outdated or anything?
nukzhy | 2022-04-18 13:41
also paper icon is here:
nukzhy | 2022-04-18 13:44
i made another icon with a script but sadly i still need to view child nodes
nukzhy | 2022-04-18 14:10
I think the tutorial is up to date, assuming you are running version 3.x.
If you want to follow the tutorial you should move your script from the Icon node to the Sprite node, and then delete the Icon node. You can do this by opening your Sprite scene, and drag your script from the resource folder and drop it onto the Sprite node. Then select the Icon node and hit delete.
After that you no longer need to use editable children, since the node with the script is in the same scene tree as the Button node. The missing icon should be visible in the script immediately after you have connected the signal from the inspector.
Ninfur | 2022-04-18 15:21
This resolved the same issue for me in the same place. Guess I wasn’t following the tutorial as closely as I thought. Thanks, dude. (Godot 4.x pre-release)
zerowacked | 2023-02-28 03:25