Minecraft – How to get a particle to spawn near a player

minecraft-commandsminecraft-java-edition

I have been trying to implement a "sweating" effect and when I try to run the command instead of the particle spawning at the player it spawns at the Command Block

here is what I have tried…

/particle dripWater ~ ~1 ~ 0.2 0.25 0.15 12 1 @a

Best Answer

You can make a command block that makes the player execute the command.

Syntax:

/execute <x> <y> <z> detect <x2> <y2> <z2> <block> <data> <command …>
/execute <entity> <command …>

So, you could try making the player execute the sweating instead.
Presume your player has a score that deduces his temperature (call it temperature), and we want him to sweat if it's above 35.

Run this command on a loop:

/execute @a[score_temperature_min=35] particle dripWater ~ ~1 ~ 0.2 0.25 0.15 12 1 @p