Lava | FEP

PHOTO EMBED

Thu May 12 2022 17:29:11 GMT+0000 (Coordinated Universal Time)

Saved by @BiscuitTinx #c#

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

public class Lava : MonoBehaviour
{
    public Health health;

    // Start is called before the first frame update
    private void OnTriggerEnter(Collider c)
    {
        // insta kill player when touching lava
        if (c.gameObject.tag == "Player")
        {
            SceneManager.LoadScene("DeathScreen");
        }
    }
}
content_copyCOPY