Why isn't this command working with armorstands?

Why isn't this command working with armorstands? - Man and Woman Sitting on Black Wooden Bench

I made 2 custom mobs, a Fairy, and a Ghost, both using armor stands as a base. After the command block creates them it assigns them a scoreboard of either Fairy or Ghost. I understand why it doesn't work, but I don't know how to fix it. I have indicated the commands below:

Ghost:

/summon ArmorStand ~ ~4 ~-4 {NoBasePlate:1,ShowArms:1,CustomName:Ghost,Riding:{id:"Bat",ActiveEffects:[{Id:14,Amplifier:1,Duration:1000000,Ambient:1}]},Equipment:[{},{id:305},{id:305},{id:305},{id:305}]}

/scoreboard players set @e[type=ArmorStand] Ghost 1

Fairy:

/summon ArmorStand ~ ~4 ~-4 {CustomName:Fairy,Invisible:1,Riding:{id:"Bat",ActiveEffects:[{Id:14,Amplifier:1,Duration:1000000,Ambient:1}]}}

/scoreboard players set @e[type=ArmorStand] Fairy 1


Best Answer

The command /scoreboard players set @e[type=ArmorStand] Fairy 1 just sets all of the armor stands in the world to 1 on objective Fairy. In the command, you should make it so that it would also track the entity's name. The command looks something like this:

/scoreboard players set @e[type=ArmorStand,name=Ghost] Ghost 1

Keep in mind, I put "Ghost" in the command, thinking that "Ghost" is the objective you have set (the "Ghost" I'm talking about is the one that comes right before the "1".). Also, after you add the armor stands to a scoreboard, type /scoreboard objectives setdisplay sidebar Ghost as debug (or "Fairy" for the "Fairy" objective). The names of the stands will be a bunch of letters and numbers (the unique identifier for each of the ArmorStands included in the objective, e.g. "bd767be3-c762-4fc9-b703-4e883c4a959c").

When you don't need the debug scoreboard anymore you can type /scoreboard objectives setdisplay sidebar to remove it from your screen.




Pictures about "Why isn't this command working with armorstands?"

Why isn't this command working with armorstands? - Woman in White Crew Neck T-shirt and Blue Denim Jeans Working on a Laptop
Why isn't this command working with armorstands? - Student doing home assignments on laptop while sitting in park
Why isn't this command working with armorstands? - A Woman in White Crew Neck T-shirt Holding a Smartphone



How do you use armor stands with commands?

The commands are as follows:
  • /data merge entity @e[type=armor_stand,sort=nearest,limit=1] {ShowArms:1} , which will change the nearest armor stand into an armor stand with arms.
  • /summon minecraft:armor_stand ~ ~ ~ {ShowArms:1} , which will summon a new armor stand with arms shown.


  • How do you summon armor stands with items?

    How to use
  • Hold the editing tool in your main hand. ( flint by default)
  • Left/right click away from an armor stand to open menu.
  • Select the labeled menu options.
  • Left/Right Click the armor stand with the tool in hand to apply those options.




  • Why Isn't Lightweight Bike Tech Cool Anymore? | GCN Tech Show Ep. 239




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: cottonbro, Anna Shvets, Karolina Grabowska, SHVETS production