Just trying to jump

//hey, I’m just starting out and barely know anything about unity or coding in but I’m trying to make a game. can you tell me what wrong with this code besides everything.//

using UnityEngine;

public class jump : MonoBehaviour
{

private void FixedUpdate(Collision collisionInfo)
{
if (Input.GetKeyDown(KeyCode.Space))
{

if (collisionInfo.collider.tag == “ground”)
{
Debug.Log(“JUMP”);

}

}
}
}

Well, yeah, lots of things. Including the need to use code tags when you post here. :slight_smile:

For example, the FixedUpdate method does not take any parameters.

So you should forget trying to make your own game from scratch for now. Go find the Learn link at the top of this page, follow it, and set aside a few months to carefully work through some tutorials, recreating what the teacher is doing but on your own machine.

When you’re ready to make a character run and jump, my Gamasutra article on 2D animation might be helpful.