public class HereDead : MonoBehaviour
{
public GameObject Player;
public GameObject Ragdoll;
void onTriggerEnter(Collider other)
{
if (other.tag == "DeadZone")
{
Player.SetActive(false);
Ragdoll.SetActive(true);
Instantiate(Ragdoll, transform.position, transform.rotation);
}
}
}
public class HereDead : MonoBehaviour
{
public GameObject Player;
public GameObject Ragdoll;
void onTriggerEnter(Collider other)
{
if (other.tag == "DeadZone")
{
Player = GameObject.Find("Player");
Ragdoll = GameObject.Find("Ragdoll");
Player.SetActive(false);
Ragdoll.SetActive(true);
Instantiate(Ragdoll, transform.position, transform.rotation);
}
}
}