Ok, so is this doing the flip correctly?
var sprite = get_node("CollisionShape2D/PlayerSprite")
sprite.set_scale(Vector2(sign(direction.x), 1))
Another advice:
Don't place your sprite under the collision shape. The reason is, collision shapes no longer exist when the game is exported. It also creates a parent/child relationship that you could easily get rid of. So instead, you could have this hierarchy:
- Zombie
- CollisionShape2D
- PlayerSprite
- Hands