#structure not loading

1 messages · Page 1 of 1 (latest)

sharp willow
#
system.runInterval(() => {
    overworld.getPlayers().forEach(player => {
        if (!player?.hasTag('vault')) return;

        const getRandomPosition = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;

        const minX = -100000;
        const maxX = -500000;
        const minY = 60;
        const maxY = 80;
        const minZ = -100000;
        const maxZ = -500000;

        const tpX = getRandomPosition(minX, maxX);
        const tpY = getRandomPosition(minY, maxY);
        const tpZ = getRandomPosition(minZ, maxZ);

        const tpLocation = `${tpX} ${tpY} ${tpZ}`;

        overworld.runCommandAsync(`tp "${player.name}" ${tpLocation}`);

        overworld.runCommandAsync(`structure load vault ~-7~2~-8`);

        overworld.runCommandAsync(`tag "${player.name}" add getTp`);

        player.removeTag('vault');
    });
});

any idea why structure is not loading?

flint trout