#I can't silence mobs using tick function

1 messages · Page 1 of 1 (latest)

vapid pumice
#

I have these commands in my tick function

execute as @e[tag=!scored,type= cat] run tag @s add scored
execute as @e[name="Averjax___"] run data merge entity @s {Silent:1b}```

3rd command doesn't work the rest is fine so it is not the problem with the tick function
I'm trying to silence mobs with specific name 
when I run the command in game it works perfectly but it doesn't work in the function file
boreal shoalBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1734278123:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

soft iris
#

Using name target selectors doesn't always work because of how names are formatted and parsed. It's better to give those mobs a tag and then check for that

vapid pumice
#

I tried giving mobs with special names a tag but it didn't work what should I use instead of @e{name=}??

soft iris
#

Right, that wouldn't work because of the same problem. How are they currently getting the custom names?

soft iris
#

If you're adding the custom names, just give them a tag at the same time

vapid pumice
#

I use name tag to name mobs

soft iris
#

Ah, I see. Then you're gonna run into inconsistencies like this. I recommend making a function that can give them the name + a tag