private float x = {-8, -4, 4, 8};
private float y = 1;
private float z = 0;
Vector3 NewPos;
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Door"))
{
Vector3 tempPos = transform.position;
int mynum = Random.Range(0, x.Length);
NewPos = new Vector3(x[mynum], y, z);
tempPos.x = NewPos.x;
tempPos.y = NewPos.y;
tempPos.z = NewPos.z;
}