Hey, I'm trying to make a block-throwing skript... Only problem is, you can place it in the air... How would I constantly check if the block under {_loc} is not air??? Heres my code:
[doublepost=1649788409,1649705612][/doublepost]anyone...?
Code:
on right click:
{block.%player%} is true
player's tool is a block
set {_return} to player's tool
remove 1 of {_return} from player
make player swing their main hand
summon armor stand at player
set {_block} to last spawned armor stand
add "{Invisible:1b}" to nbt of {_block}
add "{Small:1b}" to nbt of {_block}
set {_block}'s helmet to {_return}
set {_block}'s yaw to player's yaw
push {_block} up at speed 0.2
push {_block} forward at speed 1
wait 1 seconds
set {_loc} to {_block}'s location
kill {_block}
set the block at {_loc} to {_return}
command /bthrow:
trigger:
if {block.%player%} is not set:
set {block.%player%} to true
send "&aBlock Throw: ON"
else if {block.%player%} is false:
set {block.%player%} to true
send "&aBlock Throw: ON"
else if {block.%player%} is true:
set {block.%player%} to false
send "&cBlock Throw: OFF"
on place:
{block.%player%} is true
cancel event