GDscript not working

Godot Version



I’m new to the godot engine, so im learning it but meanwhile i was writing my frist scripts they never worked, i even asked ai for the scripts, i watched tutorials and i even watched on the godot community website, but nothing
Nothing works so the only thing i can do is ask here on the godot forum, i hope someone can help me

It looks like you need to add a space between func and _ready(). You define functions with the func keyword, and then the functions name and end with ():.

Keep in mind that the _ready() function is a reserved function that Godot gives you as a “when this node is ready, do this”.

Happy coding! :slight_smile:

1 Like

thanks for the advise! I followed your instructions but the script doesnt even show in the output, nothing even in the debugger, anymays thanks!

Hey there,
first of all, delete the _ready function with the delta parameter. So your second function. Delta is used to calculate the time between your next frames. As _ready is called when the node is ready (as sebkolind said). There is no use of delta in your ready function.
Try this:

extends Sprite

func _ready():
self.position .x = 100

_ready() only runs once when the node is created. If you want to get info about it every frame, then try:

extends Sprite

func _process(delta):

Give this a try: