Everything seems fine as far as the command goes but the weapon of the enemy won't change. execute at @e[type=minecraft:skeleton,name="Soldier"] if entity @a[d