Why can't I make my character die?

Trying to respawn my character when he hits the lava. Not sure why it’s not working. There aren’t any errors. It’s just not doing anything.

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

public class Death : MonoBehaviour
{

public Vector3 RespawnPoint;

public Transform player;

// Start is called before the first frame update
void Start()
{
RespawnPoint = new Vector3(0, 0, 0);
}

// Update is called once per frame
void Update()
{

}

private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == “Lava”)
{
Debug.Log(“Collision”);
Reset();
}
}

public void Reset()
{
player.position = RespawnPoint;
}
}

The script didn’t really work right, so I’m going to put it here.
https://hatebin.com/tjvffqutyz

I think you are trying to compare Lava to your player object, this could be the way to do it

string szOtherObject = collision.collider.gameObject.tag;
if(szOtherObject.CompareTo("Lava") == 0)
{
	Debug.Log("Collision");
}

Your script is set up to apply to another game object. I updated it to attach directly to your player, no need for public variables. I tested and it works!


Here is the update:

    // Attach script to a player, or NPC
    Vector3 RespawnPoint;

    void Start () {
        // Sets the respawn point to the position where the player started
        RespawnPoint = gameObject.transform.position;
    }

    void OnCollisionEnter (Collision collision) {
        // detects if Game Object with a collider is tagged "Lava"
        if (collision.gameObject.tag == "Lava") {
            Debug.Log ("Collision");
            Reset ();
        }
    }

    void Reset () {
        //  send player back to starting point
        gameObject.transform.position = RespawnPoint;
    }