Sprite.flip_h = true not working

Godot Version 4.2

Question

Can anybody tell me what I am doing wrong in this code my sprite doesn’t appear to flip when I input instead it stops my movement

Screenshot_2024-02-29-09-22-33-56_653f2d6f0c14415f40b50121f34f510c

nothing looks wrong here

What value is SPEED set to? Does this need to be higher?

Speed is set to 300.0

What you said hleped my movement isn’t jamming anymore but how am I supposed to give the sprites a name its already a variable for $sprite2D
*I am extending a charecter body 2D node

Continue as you were, you can use the node path shortcut, $Sprite2D, or create a new variable with @onready var sprite_2d: Sprite2D = $Sprite2D.

Check out the docs to better understand how to get a hold of nodes in your scripts, there are a number of methods, Nodes and scene instances — Godot Engine (stable) documentation in English.

1 Like

The problem don’t come from the part of the script you show us. It can be a problem from your node tree or a problems somewhere else in your script or something else.