I'm trying to add a custom NBT tag to an armor stand, but it won't add itself when I check with "nbt of the entity." Here's my code:
Can anyone help me with this?
code_language.skript:
command /dangle:
trigger:
spawn an armor stand 3 meters in front of player
add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1}" to nbt of last spawned armor stand
add "{Dangle:1}" to nbt of last spawned armor stand
if name of player's tool is set:
set name of last spawned armor stand to "%name of player's tool%"
else:
set name of last spawned armor stand to "%player's tool%"
spawn an armor stand 0.1 meters under last spawned armor stand
add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1}" to nbt of last spawned armor stand
set name of last spawned armor stand to "&c&lDangle"
add "{Dangle:1}" to nbt of last spawned armor stand
wait 3 seconds
loop entities within radius 3.5 of player:
loop-entity is armor stand
if "%nbt of loop-entity%" contains "{Dangle:1}":
kill loop-entity