Hello, I am trying to create a script that plays music when the player wears a carved pumpkin and its custom model is 26, but when wearing it, nothing happens. Can someone help me with this code?
Code:
on armor equip:
if player's helmet is carved pumpkin:
if player's helmet's custom model data is 26:
play sound "minecraft:music_disc.pigstep" with volume 100 with pitch 1 at player for player
on armor unequip:
if player's helmet is carved pumpkin:
if player's helmet's custom model data is 26:
execute console command "stopsound %player%"