Collision detection is not working when the player collides with a coin

Basically when my casual collides with a coin it doesn’t increment the amount of coins variable for the 2 characters and it doesn’t destroy the coin. The character does collide with it but the coin acts as a wall at the moment.

public class Coins : MonoBehaviour {
	
	public Transform playerMario;
	public Transform playerLuigi;
	public GameObject coin;
	public int coinsMario;
	public int coinsLuigi;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		OnCollisionEnter(Collision);
	}
	
	void OnCollisionEnter(Collision collision){
		if(collision.gameObject.tag == "Mario"){
			coinsMario += 1;
			DestroyImmediate(coin);
		}
		if(collision.gameObject.tag == "Luigi"){
			coinsLuigi += 1;
			DestroyImmediate(coin);
		}
	}
}

If I try to put something in update it throws out an error such as
Argument #1' cannot convert object’ expression to type UnityEngine.Collision', The best overloaded method match for Coins.OnCollisionEnter(UnityEngine.Collision)’ has some invalid arguments and
Expression denotes a type', where a variable’, value' or method group’ was expected that’s with:

void Update () {
		OnCollisionEnter(Collision);
}

any ideas?

As Kilobragh said +

  1. You don’t need to call OnCollisionEnter yourself. unity will call that for you automatically.
  2. Do not use Destroy Immediate. Use destroy instead. Unity - Scripting API: Object.DestroyImmediate
  3. IMPORTANT. Add a rigidbody on playerMario and playerLuigi so they can intersect with other items in the world.

void Update () {
OnCollisionEnter(Collision);
}

Why would you ever try to do that? That’s telling every single frame you want a collision to be triggered whether there is anything colliding or not- of course it gives you an error.

Also, why are you using DestroyImmediate?
You’ll lose your prefab and “coin” will no longer refer to anything.
I think what you mean to do is

Destroy(collision.gameObject, 0.0);