When using a function like this:
scoreboard objectives add health health
execute store result score @s health run data get entity @s Health
scoreboard players operation temp health = @s health
I get this error:
"scoreboard objective 'Health' is read-only"
However, this usage of the scoreboard is read only, so it is odd that this would be the error I get.
Comments 3
Some syntax must've changed between pre 1.20.X and now. Because I was facing a similar issue where I had:
scoreboard objectives add VDhealth health
execute store result score @s VDhealth run data get entity @s Health
This would give the read only error in the most recent version. To fix the issue, all I had to do was change the objective from health to dummy.
You're trying to set "health" for a scoreholder, that's what errors, not setting it to the "health" score of another.
scoreboard players operation temp dummy = @s health
works fine.Invalid/WAI.