command block not changing player health
I used this command
/execute if entity @p[scores={test=1}] run attribute @s minecraft generic.max_health base set 22
and it didnt change my attribute.
but if i splited this into 2 command blocks itll work. its giving right output
how to exact replecate:
1) type in chat /scoreboard objectives add test dummy
2) type in chat /give @p minecraft:diamond_leggings{test:1}
3) put an (always active repeating) command block with this command in it: /execute if entity @p[scores={test=1}] run attribute @s minecraft generic.max_health base set 22
4) put your pants with the special tag on
If you never set your player score to one, the condition is never met. The tag on the pants is unrelated to the score selector