Need help with my player flipping!

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xtuneon

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 ‘flip_h’ (on base ‘null instance’) with value of type ‘bool’. All I can make out of the message is that “flip_h” 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

:bust_in_silhouette: Reply From: kidscancode

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.