Trying to make it so when the player has a metadata tag, the entity targetting them stops targetting them.
on entity target:
target is a player
set {_p} to target
send "t" to {_p}
if metadata "inPod" of target is set:
cancel event
play sound "block.note_block.chime" with pitch 1.5 to target
send "initial: %target of entity%" to {_p}
else:
while target is entity's target:
send "%metadata "inPod" of target%" to {_p}
if metadata "inPod" of target is set:
reset target of entity
play sound "block.note_block.chime" with pitch 1.5 to target
wait 1 second
send "while: %target of entity%" to {_p}```
The initial target part (if the player already has the tag) works. But for some reason if the player is already being targeted and then gets the tag, the `reset target of entity` isn't working and the entity continues targeting the player.
Im not sure if im using 'reset target entity' wrong or if there is another way to do it.