I am trying to create a snowball that on impact creates a cloud, I have made the cloud using a datapack function and this is the code:
This is supposed to last for 5 seconds but I cant use console commands with variables for some reason
Code:
on projectile hit:
projectile is a snowball
set {_block} to the block at location of the projectile
loop 5000 times:
execute the command "execute positioned {_block} run function sp:particles" by console
wait 0.05 seconds