In Minecraft, I want a command to execute when a score is changed.

For example, I have a scoreholder named cameraactive on an objective named Debug. I want a command to run when this score becomes 1.

I know that Minecraft Java 1.13+ has this command:

execute if score Cameraactive Debug matches 1 run say hi

Is there a way to mimic this in 1.12.2? I'm using several mods that don't support 1.13 and above and I don't have the option to upgrade versions.

1 Answer 1


The equivalent to 1.13+'s /execute if score is the command /scoreboard players test:

scoreboard players test <scoreholder> <objective> <min> <max>

For example, with scoreholder $debug.camera_active and objective main, the command is:

scoreboard players test $debug.camera_active 1 1

Then you would follow with a chain command block, set to conditional mode, that runs whatever comes next.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .