Hi, so im making a game where the player is running around a map with others in a multiplayer game, and when they collide they will be disabled, and replaced with a ragdoll, the ragdoll will be destroyed shortly after, and the player will be reactivated and teleported to a spawn area. Know how to do that? Thanks in advance!
player.gameObject.SetActive(false);
ragdoll.transform.position=player.transform.position;
Destroy(ragdoll.gameObject,1f);
player.gameObject.transform.position=new Vector3(1,1,1);
player.gameObject.SetActive(true);