2D Platformer Character Flipping Code Error

4.3

I’m following a tutorial from 2023, and this snippet of code seems to have an error, but I can’t seem to fix it. Here’s my code:

Just indent your last 2 lines of codes with a Tab

You are assigning isLeft to sprite_2d.flip_h outside the function body, which doesn’t work in GDScript.

Move it back to _physics_process()