If I try so change a score of a dead player it doesn't work until the player respawns. I can't set his score, can't add something to his score or remove something from his score. But I can execute something from the dead player, ex. I can summon an armor stand with the /execute command on his position. Put if I can't reset the score of the dead player there will spawn a lot of armor stands, put I only need one at the death point of the player.
Attachments
Comments 5
I placed two command blocks. The first was a repeating always active one and the second was a chain always active one. In the repeating command block i wrote the command
execute as @a[scores={resDeath=1..}] at @s run setblock ~ ~ ~ diamond_block
and in the chain command block i wrote the command
execute as @a[scores={resDeath=1..}] run scoreboard players set @s resDeath 0
. The objective named resDeath I created with the command scoreboard objectives add resDeath minecraft.custom:minecraft.deaths.
Likely works as intended. You can't execute off of dead players unless you're using the @a selector. Any other selector doesn't work.