Player not jumping when the A or D key is pressed

If this is the behavior you want, then only check x value - if it is greater OR lesser than 0 then don’t jump else jump.