My jump script never seems to work (2D) ,Jump code never seems to work...?

I tried many many scripts from different sources, but they all don’t work.

The rigidbody2d on the character looks like this :

and the jump script looks like this :

and jumpPower is set to 15.

I got the script from a Youtube vid, and just like all the other scripts, it doesn’t work. I’d really appreciate help!! I’m new to Unity so I face lots of trouble like this… ,Okay so I tried various codes from many many sources but my character jump code never seems to work in my 2D game.

This one I got the code from a Youtube video, and just like the previous attempts, it doesn’t work.
So the rigidbody2d on my character looks like this :

And the jump script looks like this :
alt text
I’d really appreciate any help!!! I’m new to unity so I get these troubles a lot…

Maybe it doesn’t overcome gravity?
What you have now is gravity-scale 5, and velocity in Y 15, and it will directly begin to fall.

Try setting jumpPower to 200 or even -200 and see if something happens.

Since you have a RigidBody you can also try with AddForce().

rb.AddForce(Vector2.up * jumpPower, ForceMode2D.Impulse);

Edit: As Captain_Pineapple says, 15 is plenty. Do you even have a RigidBody component? (is rb null?)