Play sound effect for player

  • 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.

FireRoz

Active Member
May 28, 2020
133
6
18
I've been stuck on this problem for a few months now and yeah that's my code
Code:
on left click:
  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 :]":
    send "&aReloading."
    wait 15 ticks
    send "&aReloading.."
    wait 15 ticks
    send "&aReloading..."
    wait 15 ticks
    clear {ammoak47.%player%}
    send "&aReload succeeded! You may now shoot."
    play "random.bowhit" to player

errors:
https://imgur.com/a/VZ5Us9r

thx4help kbye
[doublepost=1611171387,1611171329][/doublepost]
I've been stuck on this problem for a few months now and yeah that's my code
Code:
on left click:
  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 :]":
    send "&aReloading."
    wait 15 ticks
    send "&aReloading.."
    wait 15 ticks
    send "&aReloading..."
    wait 15 ticks
    clear {ammoak47.%player%}
    send "&aReload succeeded! You may now shoot."
    play "random.bowhit" to player

errors:
https://imgur.com/a/VZ5Us9r

thx4help kbye

also here's the full code
https://pastebin.com/SRnZ1AaJ
 
I've been stuck on this problem for a few months now and yeah that's my code
Code:
on left click:
  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 :]":
    send "&aReloading."
    wait 15 ticks
    send "&aReloading.."
    wait 15 ticks
    send "&aReloading..."
    wait 15 ticks
    clear {ammoak47.%player%}
    send "&aReload succeeded! You may now shoot."
    play "random.bowhit" to player

errors:
https://imgur.com/a/VZ5Us9r

thx4help kbye
[doublepost=1611171387,1611171329][/doublepost]

also here's the full code
https://pastebin.com/SRnZ1AaJ
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
 
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
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.
 
Status
Not open for further replies.