How do I fix this Error

So I’m using a tutorial to make an interact script, but I just keep getting these errors. Can I get some help?
Here is the Error
Player Interact.cs(40,34): error CS1061: ‘InputManager’ does not contain a definition for ‘OnFoot’ and no accessible extension method ‘OnFoot’ accepting a first argument of type ‘InputManager’ could be found (are you missng…)
Here are the 2 scripts within question
This is the problem script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerInteract : MonoBehaviour
{
    private Camera cam;
    [SerializeField]
    private float distance  = 3f;
    [SerializeField]
    private LayerMask mask;
    private PlayerUI playerUI;
    private InputManager inputManager;

    // Start is called before the first frame update
    void Start()
    {
        cam = GetComponent<PlayerLook>().cam;
        playerUI = GetComponent<PlayerUI>();
        inputManager = GetComponent<InputManager>();
    }

    // Update is called once per frame
    void Update()
    {
        playerUI.UpdateText(string.Empty);
        Ray ray = new Ray(cam.transform.position, cam.transform.forward);
        Debug.DrawRay(ray.origin,ray.direction * distance);
        RaycastHit hitInfo;
        if (Physics.Raycast(ray, out hitInfo,distance,mask))
        {
            if(hitInfo.collider.GetComponent<Interactable>() != null)
            {
                Interactable interactable = hitInfo.collider.GetComponent<Interactable>();
                playerUI.UpdateText(interactable.promtMessage);
                if (inputManager.OnFoot.Interact.triggered)
                {
                    interactable.BaseInteract();
                }
            }
        }
    }
}

and here is the refrenced one

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class InputManager : MonoBehaviour
{
    private PlayerInput playerInput;
    private PlayerInput.OnFootActions onFoot;

    private PlayerMotor motor;
    private PlayerLook look;

    // Start is called before the first frame update
    void Awake()
    {
        playerInput = new PlayerInput();
        onFoot = playerInput.OnFoot;
        motor = GetComponent<PlayerMotor>();
        look = GetComponent<PlayerLook>();
        onFoot.Jump.performed += ctx => motor.Jump();

    }

    // Update is called once per frame
    void FixedUpdate()
    {
        motor.ProcessMove(onFoot.Movement.ReadValue<Vector2>());
    }

    void LateUpdate(){
        look.ProcessLook(onFoot.Look.ReadValue<Vector2>());
    }

    private void OnEnable(){
        onFoot.Enable();
    }

    private void OnDisable(){
        onFoot.Disable();
    }
}

It’s a typo. You declared

private PlayerInput.OnFootActions onFoot;

With a lowercase “o”

So its supposed to be like this?

private PlayerInput.OnFootActions OnFoot;

You can call it whatever you want. The important part is to spell it the same way every time.

Now its giving me a new error though. saying that I can’t access inputManager.onFoot because of its protection level

Yes, you marked it as private, which means it can only be accessed from within the InputManager script. If you want to access it from the PlayerInteract script you need to mark it as public.

If you are following a tutorial, make sure you follow it exactly and type everything identically otherwise you’ll run into a lot of these sort of errors.