Coyote Jump problem

Godot Version 4.1

My Coyote Jump isn’t working.
I’ve be trying this for a bit, and it is not working. The logic says that if I leave the ground and the velocity.y is greater than or equal to 0 it should start a coyote timer should start and cyoteJump should be false. I’ll show the full code if you guys have any input, please let me know. also, my coyote timer node is set to one shot AutoStart is off wait time is .2 and callback is idle.
extends CharacterBody2D

const SPEED = 100.0
const JUMP_VELOCITY = -150.0
const FRICTION = 600
const GRAVITY = 300
const JUMP_RELEASE = -50

var coyoteJump = false
var bufferJump = false
var doubleJump = 1

@onready var animated_sprite_2d = $AnimatedSprite2D
@onready var coyote_timer = $CoyoteTimer
@onready var buffer_jump_timer = $BufferJumpTimer

func _physics_process(delta):

apply_gravity(delta)
# Handle Jump checking to see if i'm on the floor and if coyote is true
if is_on_floor() or coyoteJump == true:
	doubleJump = 1
	if Input.is_action_just_pressed("ui_accept") or bufferJump:
		velocity.y = JUMP_VELOCITY
		bufferJump = false
		animated_sprite_2d.play("jump")
if not is_on_floor():
	if Input.is_action_just_released("ui_accept") and velocity.y < JUMP_RELEASE:
		velocity.y = JUMP_RELEASE
	if Input.is_action_just_pressed("ui_accept") and doubleJump > 0:
		velocity.y = JUMP_VELOCITY
		doubleJump -= 1
	if Input.is_action_just_pressed("ui_accept"):
		bufferJump = true
		buffer_jump_timer.start()
		



# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input = Vector2.ZERO
input.x = Input.get_axis("ui_left", "ui_right")
if input.x:
	velocity.x = input.x * SPEED
	animated_sprite_2d.play("walk")
	animated_sprite_2d.flip_h = input.x < 0
	
	
else:
	velocity.x = move_toward(velocity.x, 0, FRICTION * delta)
	animated_sprite_2d.play("default")

#checks to see if im on the ground then checks to see if im not on the ground if velcity is greter 
#than zero or equal to zero then coyote jump is true
var was_on_floor = is_on_floor()
var just_left_ground = was_on_floor and not is_on_floor() and velocity.y >= 0
print(just_left_ground)
if just_left_ground:

	print("timer start", coyote_timer)
	coyote_timer.start()
	coyoteJump = true
move_and_slide()

func apply_gravity(delta):
# Add the gravity.
if not is_on_floor():
velocity.y += GRAVITY * delta

func _on_coyote_timer_timeout():
print(“Coyote Timer Timeout”)
coyoteJump = false

func _on_buffer_jump_timer_timeout():
bufferJump = false

This is the problem; can you see it?

No, you would have to tell what it is. I know that it is a problem because when I tried to print timer start it never showed up. Sorry I’m still trying to figure things out. Also thank you for replying.

The logic used for finding just_left_ground does not make sense if is_on_floor() returns false; that means the player left the ground, right? so
change just_left_ground in the if statement with this (not(is_on_floor()) && velocity.y >= 0)

Thank you for help! I was look at a HeartBeast tutorial for this and I was tripping up but it was 3.5 not 4. So, I looked at his one for 4 and it fixed my problem. I took out the coyoteJump var and just used the time and it worked. here is the logic for anyone who needs it. Again, thank you for the reply.
extends CharacterBody2D

const SPEED = 100.0
const JUMP_VELOCITY = -150.0
const FRICTION = 600
const GRAVITY = 300
const JUMP_RELEASE = -50

var coyoteJump = false
var bufferJump = false
var doubleJump = 1

@onready var animated_sprite_2d = $AnimatedSprite2D
@onready var coyote_timer = $CoyoteTimer
@onready var buffer_jump_timer = $BufferJumpTimer

func _physics_process(delta):

apply_gravity(delta)
# Handle Jump checking to see if i'm on the floor and if coyote is true
if is_on_floor() or coyote_timer.time_left > 0.0:
	doubleJump = 1
	if Input.is_action_just_pressed("ui_accept") or bufferJump:
		velocity.y = JUMP_VELOCITY
		bufferJump = false
		animated_sprite_2d.play("jump")
if not is_on_floor():
	if Input.is_action_just_released("ui_accept") and velocity.y < JUMP_RELEASE:
		velocity.y = JUMP_RELEASE
	if Input.is_action_just_pressed("ui_accept") and doubleJump > 0:
		velocity.y = JUMP_VELOCITY
		doubleJump -= 1
	if Input.is_action_just_pressed("ui_accept"):
		bufferJump = true
		buffer_jump_timer.start()
		



# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input = Vector2.ZERO
input.x = Input.get_axis("ui_left", "ui_right")
if input.x:
	velocity.x = input.x * SPEED
	animated_sprite_2d.play("walk")
	animated_sprite_2d.flip_h = input.x < 0
	
	
else:
	velocity.x = move_toward(velocity.x, 0, FRICTION * delta)
	animated_sprite_2d.play("default")

#checks to see if im on the ground then checks to see if im not on the ground if velcity is greter 
#than zero or equal to zero then coyote jump is true
var was_on_floor = is_on_floor()
move_and_slide()
var just_left_ground = was_on_floor and not is_on_floor() and velocity.y >= 0
if just_left_ground:
	coyote_timer.start()
	
print(coyoteJump)
print(doubleJump)

func apply_gravity(delta):
# Add the gravity.
if not is_on_floor():
velocity.y += GRAVITY * delta

func _on_coyote_timer_timeout():
pass

func _on_buffer_jump_timer_timeout():
bufferJump = false