Collision not working properly

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

public class fredbearkill : MonoBehaviour
{
    // Start is called before the first frame update
    void OnTriggerEnter(Collider player)
    {
        SceneManager.LoadScene("fredbearjumpscare");
    }

    
}

Explanation: https://drive.google.com/file/d/1UQWj6cNllO90iCzB8iUoMJ-e8iC_ua4a/view?usp=sharing

Hi! The problem is that the OnTriggerEnter function will be called on any collision with any your objects, including those that aren’t your player (like the floor or walls). All you need is a simple if statement to check if the collisions name or tag (or anything really) is that of the player.

void OnTriggerEnter(Collider collider)
{
    if (collider.gameObject.layer == LayerMask.NameToLayer("Player"))
    {
        SceneManager.LoadScene("fredbearjumpscare");
    }
}

Hope this helps!