i have some people walk around the scene but it will destroy after going away from the scene

i have the Some people to walk around in the scene but they have to destroy after going away from the scene plz help and fast

if(Vector3.Distance(gameObject.transform.position, Vector3.zero) > 100) Destroy(gameObject);