1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Play sound effect for player

Discussion in 'Skript' started by FireRoz, Jan 20, 2021.

Thread Status:
Not open for further replies.
  1. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    I've been stuck on this problem for a few months now and yeah that's my code
    Code (Text):
    1. on left click:
    2.   player is holding a stick named "&cAK-47" with lore "&7Right click from a distance at a player.%newline%&7you're gonna be there soon :]":
    3.     send "&aReloading."
    4.     wait 15 ticks
    5.     send "&aReloading.."
    6.     wait 15 ticks
    7.     send "&aReloading..."
    8.     wait 15 ticks
    9.     clear {ammoak47.%player%}
    10.     send "&aReload succeeded! You may now shoot."
    11.     play "random.bowhit" to player
    errors:
    https://imgur.com/a/VZ5Us9r

    thx4help kbye
    --- Double Post Merged, Jan 20, 2021, Original Post Date: Jan 20, 2021 ---
    also here's the full code
    https://pastebin.com/SRnZ1AaJ
     
  2. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    Couldn't you just use console?

    instead of 'play "random.bowhit" to player' it would be,

    make console execute command "/playsound random.bowhit %player%" (1.8.9)

    make console execute command "/playsound minecraft:block.anvil.fall block %player%" (1.16)

    btw I couldn't find the bow sound in 1.16 so I used an anvil sound
     
  3. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    I didn't know in Minecraft you could specify players.
    Also, I don't want to do it as console as this sound is gonna be played often and I don't want to get spammed so... Also I want to see when people execute Minecraft commands so I don't want to turn that off.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...