2D platform character not falling correctly

Check out this page for how to post code nicely on the forums: Using code tags properly

Remember that if you want to use physics, it’s a good idea to move your game objects with force or velocity, rather than adjusting the transform directly.

Also, as I tried to glance at your code, be sure you’re not overriding the gravity when you move. For example, do not tell the game that your next position or velocity is some distance to the left/right and no change in height, if you are falling. I think you are doing gravity yourself there.

Also, you must have a rigidbody2D on your character if you want the TriggerStay message to be called. Plus that must be a trigger.

After all that has been said, if you have not already gone over some of the tutorials on this site, you should really consider doing it to help yourself: Learn
Check out the introduction stuff for scripting, unity essentials, and 1 or 2 starter tutorials, as well as whatever other beginner lessons seems helpful to you. :slight_smile:

Good luck.