For a project I'm working on, I want to be able to execute a setblock command at a player with a certain score. I've tried doing

/execute @a[score_xp_min=100] -insert command here-

but all it says is that I've provided an improper UUID format. Is there any way to /execute commands at players with certain scores?


The selector format is correct, but the problem is that the syntax of /execute is:

/execute <Target> <X> <Y> <Z> <Command>

To fix your problem simply add 3 tilde (~) after the @a selector:

/execute @a[score_xp_min=100] ~ ~ ~ <Command>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.