Object and first-person controller's collision not being registered

Basically, I’m trying to develop a mechanic where an object will stop being affected by gravity and be pushed forward by the player when the two collide, so I wrote a C# script to do exactly that. However, whenever the player collides with the object, it doesn’t seem to register a collision. Any help or advice on fixing this issue?

Script:

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

public class ObjectScript : MonoBehaviour {

	public float force;

	// Use this for initialization
	void Start () {
		
		GetComponent<Rigidbody> ().useGravity = true;
	}
	
	// Update is called once per frame
	void Update () {


	}

	void OnCollisionEnter (Collision col) {
	
		if (col.gameObject.tag == "Player") {

				GetComponent<Rigidbody> ().useGravity = false;
				Vector3 dir = col.contacts [0].point - transform.position;
				dir = -dir.normalized;
				GetComponent<Rigidbody> ().AddForce (dir * force);
			}


		
		}

}

I have thought of only 2 things that could be causing the issue:

  1. you are looking for the tag “Player” while the tag your player has is actually “player”

  2. if your player doesnt have a rigidbody attached (or its set to kinematic) the collision wont be registered in OnCollisionEnter, or at least thats what i have been told.

hope this helps…