That is when I drag-n-drop label text on visual script window, then it added as “set text… on scene node”, not as “node set… label text”, and as a result when I run it and press the button, I don’t see label text at all, although I expect to see new text
What is I just want to set new label text when I press a button, using visual script.
What I do wrong?
You need to provide a screenshot or your project so we can try to help you.
I strongly suggest that you try GDScript, it’s sooo easy and I (for real) think that it’s easier to make scripts using GDScript than in VisualScript, beside that in GD you can keep things more organizated and you can do more in less time since you don’t have to connect lines and etc.
For exemple, what you want to do you could do in GDScript just by typing $YourLabelName.text = "the new text".
I really recommend this course on Udemy, I saw it myself and I can say that its really great; it goes from the very very basics to more advanced stuff, it’s totally worth the $20.
Here’s a screenshot as simple as I can get it in Visual Script:
Connect signal pressed() from Button in the Node panel (beside Inspector) to your visual script. With that Visual Script open, drag Text in from the right Inspector panel ( need to have label selected on the right side in the Scene Panel)
Connect the two with the white line, type in your text, hit enter so you see it in the box like in the screenshot and run it.