Sound on block break isnt working.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Alec Tarr

Member
Jun 17, 2019
1
0
0
22
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:

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?
 
Status
Not open for further replies.