0 votes

Someone can help me to fix this ?! enter image description here

If you can explains please explaind to me, i still dont undersand

![HOW to fix this ?

in Engine by (12 points)
edited by

1 Answer

0 votes

Note: Your image link was broken, so I edited your post to fix it.

There are a couple of problems here:

  • There should be no . after if in GDScript

  • is_action_pressed() is a method of Input: Input.is_action_pressed()

You can see several examples of simple movement like this here: 2D Movement overview

It is also highly recommended that you read through the official tutorial, found here:

by (22,067 points)

My friend still can't do it, even though I copy paste from the official tutorial

That's not something I can respond to. Error messages can be explained. Incorrect code can be addressed. There's no suggestions to be made to "still can't do it" other than try and read the tutorial again and follow more carefully. Did you do the "Your First Game" section?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.