Thank you for helping me out with this. I am going to remake the game once I have more experience with js, as right now I just need it for a portfolio.
Thanks
Edit:
Do you have any idea on why the gravity variable constantly 0? It worked fine in basic processing. My only guesses on why its not working as intended is that it is a function that does not exist in p5js or that If statements work differently.
If the player coordinates are not in the specified rectangles above platforms, then gravity should gradually increase to 3.5. But something is preventing that and the basic debug from processing does not exist in p5js. I have updated my code repository with whatever I have changed now for it to work in basic processing and for jumping to be included.