Solved Sound Test Command

  • 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 community!

    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!

VisualMCINC

New Member
Oct 9, 2023
7
0
1
The skript is loading without errors, however, If I do
Code:
/playsound VisualMCINC MUSIC_DISC_11
, despite the player being online, it returns the player not found message.
if someone could explain where I went wrong, I'd appreciate it.

Code:
command /psound <text> <text>:
    permission: psound.use
    trigger:
        set {_target} to arg 1
        set {_sound} to arg 2
        if {_target} is online:
            play sound "{_sound}" to {_target}
            send "&8[&e&l!&8] &6&lᴠᴍᴄ &7→ &6%{_target}%&F made you listen to: &6&o%{_sound}%" to player
        else:
            send "&8[&e&l!&8] &6&lᴠᴍᴄ &7→ &fPlayer not found or not online
 
Hey, try this
Code:
command /psound <player> <text>:
    permission: psound.use
    trigger:
        set {_target} to arg-1
        set {_sound} to arg-2
        if {_target} is online:
            play sound "%{_sound}%" to {_target}
            send "&8[&e&l!&8] &6&lᴠᴍᴄ &7→ &6%{_target}%&F made you listen to: &6&o%{_sound}%" to player
        else:
            send "&8[&e&l!&8] &6&lᴠᴍᴄ &7→ &fPlayer not found or not online"
 
  • Like
Reactions: VisualMCINC