Hello I am very new to using the famous Minecraft plugin Skript. But I've tried making a skript that shoots a fireball from the player, and then I tried making it loop all blocks in the radius 5 of the fireball and if a block in the radius 5 isn't air it should stop the loop and send " Block is near the fireball" to the player. but it doesn't work. I've also tried adding a "check" send to make sure that the loops run and it should say "Hello" to the player if the loop runs but it doesn't even do that. Here's the skript:
on right click with gold hoe:
send "&c&lFIRE" to player
shoot a fireball at speed 1
set {_fireball} to last spawned entity
while {_fireball} is not dead:
loop blocks in radius 5 of {_fireball}:
send "Hello" to player
if loop-block is not air:
# Do something here, for example:
send "&cA block is near the fireball!" to player
stop loop
wait 1 tick
on right click with gold hoe:
send "&c&lFIRE" to player
shoot a fireball at speed 1
set {_fireball} to last spawned entity
while {_fireball} is not dead:
loop blocks in radius 5 of {_fireball}:
send "Hello" to player
if loop-block is not air:
# Do something here, for example:
send "&cA block is near the fireball!" to player
stop loop
wait 1 tick