Minecraft executing on a random enitity not working

//ads -- adsterra.com -- native banner
?>
I am trying to set a stone block underneath a random armor stand, that is called disco stand. There are nine.
I put in this command:
/execute @r[name=DiscoStand] ~ ~ ~ /setblock ~ ~-1 ~ stone
... but it doesn't work. Any ideas, anyone?
Best Answer
@r
, by default, only selects players. To get it to select another entity, use the type
argument:
/execute @r[name=DiscoStand,type=ArmorStand] ~ ~ ~ /setblock ~ ~-1 ~ stone
Pictures about "Minecraft executing on a random enitity not working"



Minecraft Execute Command [1.19] Tutorial
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Kampus Production, Pixabay, Mikhail Nilov, Pixabay