function lazer(p: player):
loop all blocks infront of {_p}:
if loop-block is air:
draw 10 of dust using dustOption(rgb(0, 255, 0), 1) at loop-block
if loop-block is not air:
push {_p} in direction of {_p} at speed 2
push {_p} up at speed 1
wait 1 ticks
play sound "minecraft:entity.fishing_bobber.throw" with volume 5 from the loop-block
stop
#Function Error
1 messages · Page 1 of 1 (latest)
Skript Hub - Documentation
Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.
Please note that sound names can get changed in any Minecraft or Spigot versio...
As you can see the playsound effect takes a player at the end. When you dont give it a player it tries to get one from the trigger but as the error says, the function does not have a player. You have to add to {_p} at the end so it know who to play the sound to. Alternatively you could also play it to all players
oh ok