Skip to main content
1 of 2

how do i execute a command at an entity with a certain nbt data

im trying to execute a test command where every single creeper with a walkspeed of 0 spawned in, runs a command summon zombie at directly at the creeper with the nbt i specified with the nbt

commands i tried

  • /execute as @e[type=creeper] at @s[nbt={Attributes:generic.movementSpeed,Base:0f}] run summon zombie

  • /execute at @e[type=creeper,nbt={Attributes:generic.movementSpeed,Base:0f}] run summon zombie

  • /execute at @e[type=creeper] if entity @s[nbt={Attributes:generic.movementSpeed,Base:0f}] run summon zombie

and that was all i could think of to try and make it work