Question by
JAS1312 · Jun 01, 2020 at 10:33 AM ·
playerdeathrespawning
death and respawn
Hi all I am attempting to get it so if a player jumps off the cliff they die and respawn at a set point. here is the code i'm using:
public class Respawn : MonoBehaviour { [SerializeField] private Transform Player; [SerializeField] private Transform respawnpoint;
private void OnTriggerEnter(Collider other)
{
Player.transform.position = respawnpoint.transform.position;
}
}
the issue is on testing I jump off the cliff and fall straight through with out anything happening. my player is tagged as player and the respawn point and player are placed into the fields. I also have ridged body on the object. ans its set to trigger too. Any ideas what i'm doing wrong?
I can do a vid showing what i'm talking about if needed.
Comment