Problem with player dead and respawn

Hi guys! I’m making a 2d game for my exam’s project but i have a problem. When the player touches the obstacle , he goes through him and not die , and consequently the checkpoint don’t start. Anyone can help me?
I’ve create 3 script for manage that.
Here the code CHECKPOINT:

public class Checkpoint : MonoBehaviour {

    public LevelManager levelManager;
    // Use this for initialization
    void Start () {

        levelManager = FindObjectOfType<LevelManager>();

    }

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

    void onTriggerEnter2D(Collider2D other)
    {
        if (other.name == "Player")
        {
            levelManager.currentCheckpoint = gameObject;
            Debug.Log("Activated Checkpoint" + transform.position);
        }
    }

Here the code KILLPLAYER:

public class KillPlayer : MonoBehaviour {

    public LevelManager levelManager;

	// Use this for initialization
	void Start () {

        levelManager = FindObjectOfType<LevelManager>();

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

    void onTriggerEnter2D(Collider2D other)
    {
        if (other.name == "Player")
        {
            levelManager.RespawnPlayer();
        }
    }
}

And here the code LEVELMANAGER:
public GameObject currentCheckpoint;

private PlayerController player;

public GameObject deathParticle;
public GameObject respawnParticle;

// Use this for initialization
void Start () {

    player = FindObjectOfType<PlayerController>();

}

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

}

public void RespawnPlayer()
{
    Instantiate(deathParticle, player.transform.position, player.transform.rotation);
    Debug.Log("Player Respawn");
    player.transform.position = currentCheckpoint.transform.position;
    Instantiate(respawnParticle, currentCheckpoint.transform.position, currentCheckpoint.transform.rotation);
}

}

Also, i post pictures with object attributes. Thanks to anyone will help me! :slight_smile:

I think the problem is that you do not have a rigidbody attached to one of the two colliding objects. Without a rigidbody in at least one, the trigger isn’t activated. Does your player have a rigidbody attached? (The unity documentation about OnTriggerEnter2D doesn’t say this explicitly, but the OnTriggerEnter documentation does, so I think this is the problem: Unity - Scripting API: MonoBehaviour.OnTriggerEnter(Collider))
Edit: I just noticed that you spelled OnTriggerEnter2D wrong in both scripts. It should start with a capital O.

Yes, my player have attached the Rigidbody 2D