I'm trying to make it to where when a player breaks a block, there is a chance that it'll play a custom sound.
My script is this:
However, it isn't playing the sound at all when I'm constantly breaking leaves. When I tried removing the chance line, it also acted weird and only played it probably once every 6 seconds or so. It WOULD work when i would break a block, wait for a bit, and break another.
I assume theres probably a better way I can go about doing this. Any suggestions?
My script is this:
Code:
on break of leaves:
chance of 10%:
Execute console command "/execute %player% ~ ~ ~ /playsound custom.breathtaking master @p ~ ~ ~ 500 1 1"
However, it isn't playing the sound at all when I'm constantly breaking leaves. When I tried removing the chance line, it also acted weird and only played it probably once every 6 seconds or so. It WOULD work when i would break a block, wait for a bit, and break another.
I assume theres probably a better way I can go about doing this. Any suggestions?