The player is supposed to be destroyed when falling into the green slime and then the game resets. But instead the player just falls through forever. What is wrong? (I’m new at unity)
Pic attached of the box collider.
And this is the destroy script for the box collider in the slime:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class KillBox : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Player")
{
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
}
}