Long story short, me and a couple of my friends decided to make a server that we can play on because we were bored, and we wanted to add trails to our shop. The trails would work like so: every player that has fogTrailEquipped = 1, we display the particles on them. But for some reason my command doesnt work after I added the @a[scores={fogTrailEquipped=1}] part.
heres my command (on a repeating command block):
execute at @a[scores={fogTrailEquipped=1}] run particle minecraft:ash ~ ~ ~ 0 0.5 0 70 70 normal
Minecraft – Help with @a[scores={objective=1}]
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – Testing if there is an entity with a objective score lower than another objective score
- Minecraft – How to find the top scores of an objective
- Minecraft – Help with /scoreboard objective score abuse!
- Minecraft – My arrows aren’t being executed at by a looping function/command block
- Minecraft – Objective minecraft.custom:minecraft.leave_game not working
Best Answer
The command is functional, so check the following:
Is the command block activated?
Check that the command block is set to
Repeat
andUnconditional
.If it is activated by redstone, (
Needs Redstone
) make sure it is powered by a redstone input, such as a lever, redstone block, etc.If it is set to
Always Active
, make sure that the command block did not glitch and stop activating. (This happens to me sometimes.) Change the setting toNeeds Redstone
and then back toAlways Active
. You can make sure it is activating if the time inPrevious Output
increases.Does the target player have the score?
Type
/scoreboard objectives setdisplay sidebar fogTrailEquipped
. Any players that have a score will appear in the list. You can clear the sidebar later with/scoreboard objectives setdisplay sidebar
.Is the scoreboard a dummy scoreboard?
If the scoreboard is not a dummy scoreboard, you may have issues giving scores to players. Type
/scoreboard players set @s fogTrailEquipped 1
. If an error returns: "Scoreboard objective `fogTrailEquipped` is read-only", then you need to delete the scoreboard and recreate it:Is the command block loaded?
Command blocks will not work if the chunk it is located in is unloaded. Chunks unload whenever a player is not nearby, so if the command block is far away this may be the reason. You can fix this issue by placing the command block in the spawn chunks, which are never unloaded.
Are your particles off?
The particles will not be visible if you have your particle settings set to
Minimal
. You can fix this by changing the setting toDecreased
orAll
, or you can change your command to show particles regardless of settings:execute at @a[scores={fogTrailEquipped=1}] run particle minecraft:ash ~ ~ ~ 0 0.5 0 70 70 force