How can I use score_-_min on effects?

//ads -- adsterra.com -- native banner
?>
I'm trying to give effects to a player who is holding a certain sword using scoreboard objective but the command block literally just does absolutely nothing, it doesn't even give an output
Best Answer
Scoreboard setup:
/scoreboard objectives add HoldingSword dummy
Clock:
/scoreboard players set @a HoldingSword 0
/scoreboard players set @a HoldingSword 1 {SelectedItem:<Sword>}
/effect @a[score_HoldingSword_min=1] <effect> [seconds] [amplifier] [hideParticles]
Pictures about "How can I use score_-_min on effects?"



How to get the minimum possible score across the Mass Effect Trilogy
More answers regarding how can I use score_-_min on effects?
Answer 2
This probably won't help, but try adding:
@a[score_HoldingSword_min=1,*score_HoldingSword_max=1*]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Plato Terentev, Erik Mclean, Ylanite Koppens