0

I'm trying to get my player to jump when you press the button. I get NullReferenceException and can not find the solution to this could anyone help me with this? I have set the ground as tag "Ground", and made onClick on the button with the player as a reference.

The movement is working but not the jump button.

Movement

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • For future questions please remember to post code as next not as a screenshot. – Jamiec Feb 03 '22 at 10:09
  • You have to set the rb in the Start() Method and further more you never call Jump (At least not in that Screenshot). Another thing you should do is using a autoformater so your code looks more clean. this helps you and others to read it – At Least Vision Feb 03 '22 at 15:59

0 Answers0