I would like to ask for help with this script so that the player is not teleported to the sky, how can I fix in this script? I would be grateful
Posted by: bill1656 from the skUnity Discord. View the thread on skUnity Discord here
code_language.skript:
command /rtp:
trigger:
set {_x} to random integer from {@minimumxz} to {@maximumxz}
set {_y} to 50
set {_z} to random integer from {@minimumxz} to {@maximumxz}
set {_location} to location at ({_x}, {_y}, {_z}) in world "{@world}"
set {_block} to block at {_location}
loop all blocks above {_block}:
if loop-block is air:
if block under loop-block is {@blockblacklist}:
if {@debug} is true:
send "&7&oFailed random teleportation attempt (blacklisted block: %block under loop-block%&7&o). Retrying..." to player
exit loop
if {@regioncheck} is true:
if region at loop-block is set:
if {@debug} is true:
send "&7&oFailed random teleportation attempt (region is set). Retrying..." to player
exit loop
add 1 to {_i}
if {_i} >= 2:
teleport player at loop-block
Posted by: bill1656 from the skUnity Discord. View the thread on skUnity Discord here