public void recieveAction() { if (!this.enabled) { return; } MetaScript.preTeleport(); player.GetComponent <DynamicGeneration>().enabled = false; MetaScript.GetInBuilding().setPlayerInBuilding(true); player.transform.position = new Vector3(bg.getdoorxlocation() + bg.getxlocation(), bg.getylocation(), bg.getdoorzlocation() + bg.getzlocation()); MetaScript.postTeleport(); player.GetComponent <InBuilding>().setPlayerInBuilding(true); disableParticleSystems(); }