I am making a map and I need to kill any player that steps on an iron block, but the commands aren't working. Here are the commands:
Prequisites:
/scoreboard objectives add IRONDEATH dummy /scoreboard objectives setdisplay sidebar IRONDEATH
Repeat always active command blocks:
/scoreboard players set @a IRONDEATH 0
Chain always active command blocks:
/execute @a ~ ~ ~ detect ~ ~1 ~ iron_block 0 /scoreboard players set @a[c=1,r=1] IRONDEATH 1 /execute @a[score_IRONDEATH_min=1] ~ ~ ~ /kill @a[score_IRONDEATH_min=1]