+1 vote

Hello

Iam new to Godot and Im making a simple platformer while following a tutorial. Im trying to make the Player look left while going left and make the Player look right when going right. I used the same code he used in him video but when I start the game and press left or right button it puts me back in the script and says at the bottom: "Invalid set index 'fliph' (on base 'null instance') with value of type 'bool'. All I can make out of the message is that "fliph" isn't used to do that Im probably thinking that wrong. Im sorry if this question is stupid but Im very new to all this. Thanks in advance!enter image description here

Godot version 3.2.2.stable.official
in Engine by (22 points)

1 Answer

0 votes

The "null instance" error means that the thing you're trying to call flip_h on doesn't exist. That means sprite in this case. Check what value you've assigned to sprite, and ensure that it is a node that really exists.

by (22,069 points)
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.