Create a trigger objective
/scoreboard objectives add menu triggerCreates the menu objective of type trigger, the only kind /trigger accepts.

/trigger lets players without cheats change their own score in an objective of type trigger. Maps and servers use it for menus, votes and clickable chat buttons: the player triggers a value, and a command block or a function reacts to it.
/trigger <objective> [add|set]| Argument | Expects | What it does |
|---|---|---|
| objective | Scoreboard objective | Objective of type trigger that was enabled for you, for example menu or vote. |
| valueoptional | Whole number | Whole number to add with add, or to set with set. Without it, 1 is added. |
/scoreboard objectives add menu triggerCreates the menu objective of type trigger, the only kind /trigger accepts.
/scoreboard players enable @a menuAllows all online players to use /trigger menu once.
/trigger menuAdds 1 to your menu score, then locks the trigger until it is enabled again.
/trigger menu set 3Sets your menu score to exactly 3, for example to pick the third entry of a menu.
/execute as @a[scores={menu=1..}] run function mypack:menuRuns the menu function for each player whose menu score is 1 or more. Reset and enable the score again inside it.
Fill in the fields, then copy the command.
Command generatorCreate the objective with /scoreboard objectives add menu trigger, then unlock it with scoreboard players enable @a menu. A player can now type /trigger menu (adds 1), /trigger menu add 5 or /trigger menu set 3. After each use, the trigger is locked again for that player until it is enabled once more.
A Repeating Command Block or a tick function checks the score and runs the action: execute as @a[scores={menu=1..}] run function mypack:menu. In that function, reset the score with scoreboard players set @s menu 0 and unlock it again with scoreboard players enable @s menu. Clickable text from /tellraw or a button in a /dialog can run /trigger for the player, which makes it the standard way to build menus that need no operator rights.
"You cannot trigger this objective yet" means the trigger was not enabled for you, or you already used it. "You can only trigger objectives that are 'trigger' type" appears when the objective uses another criterion, such as dummy. Only players can run /trigger: a command block or the server console cannot.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Each use locks the trigger for that player. Run scoreboard players enable again after handling the value, usually in the same function.
Yes. add accepts negative numbers and set accepts any whole number, for example /trigger vote set -1.
Type it in the chat, no cheats needed: /trigger <objective> [add|set].
Every player.