checking if a player who got hit has a tag
hey, does anyone have any idea why this isnt working:
Continue to help posttag @s add Hit execute as @a[distance=..10,nbt={HurtTime:10s}] run execute as @s[tag=Spikey] run execute as @a[tag=Hit] run function aussie:thornyeffects advancement revoke @s only aussie:hit tag @s remove Hit
so basically what im trying to do is this function is ran after an advancement that runs when you hit another player, so it gives you a tag called Hit, and then with the hurttime thing, i tried to run a part of that command as the player that got hit, as the player that got hit, you check if the player got hit has the tag Spikey, if they do, it checks if ANYONE has the tag Hit, and that would be the person who just hit them, so now its running as the person who hit the other player, than it runs a function as the person who hit the other player which gives effects, is there anything im doing wrong? thanks im on 1.21.