Hello, I want to make a command so the player will shoot a Oak Leave and when the Oak Leave hits the ground it will make a trap. But it doesn't work very well. Any one knows how to fix it?
code_language.skript:
command /trap:
trigger:
make the player shoot an item projectile of 1 oak leaves at speed 1.2
on item hit:
if event-item is oak leaves:
set {trap.location.%player%} to location of event-location
loop blocks in radius 4 of {trap.location.%player%}:
if loop-block is air:
set loop-block to oak leaves
loop blocks in radius 3 of {trap.location.%player%}:
if loop-block is oak leaves:
set loop-block to air
wait 5 seconds
loop blocks in radius 4 of {trap.location.%player%}:
if loop-block is oak leaves:
set loop-block to air