1
How to kill any player that steps on white concrete using command blocks?
I'm making a parkour world and need to make it that when a player step on white concrete, they die.
Nothing seems to work, so I need help.
Nothing seems to work, so I need help.
Create an account or sign in to comment.
12

Going off of Budderman18's response, the "run" function is used to execute a command within a command. You can swap out "kill @p" with any other command to make stepping on any kind of block do any kind of thing.
Here's a tutorial on the whole concept.
Here's a tutorial on the whole concept.

execute at @p if block ~ ~-1 ~ white_concrete run kill @p
make sure its a repeating command block
make sure its a repeating command block

i put '/execute at @p if block ~ ~-1 ~ white_concrete run kill @p' but the previous output says "Execute subcommand if block test failed".
The command block is repeating, unconditional and always active. Are you sure it works on edu edition?
The command block is repeating, unconditional and always active. Are you sure it works on edu edition?

bedrock doesn't allow /kill on creative players for whatever reason. Make sure to test in survival or adventure.

already have. and edu and bedrock are the same kind of edition but off by bit right?

Not just by a bit. Edu hasn’t even gotten last year’s fall drop. And need I add that since you’re on Edu, you could just do something with Code Builder?

damn since that long? and yeah code builder is a thing but i dont use it

This is detecting if the block underneath the command block is white concrete (you have not updated the selector context).
The command should actually be:
Because bedrock still uses ids for block variants, the command could be this instead:
(0 is the blockstate id for white concrete)
The command should actually be:
execute as @a at @s if block ~ ~-1 ~ white_concrete run kill @s
Because bedrock still uses ids for block variants, the command could be this instead:
execute as @a at @s if block ~ ~-1 ~ concrete 0 run kill @s
(0 is the blockstate id for white concrete)

it still comes up with "Execute subcommand if block test failed" in the previous output box no matter if its conditional or not.

Conditional means it relies on the command block behind it to be able to run successfully first
This mc bedrock video explaining the execute command supports the command I gave.
Try replacing the kill command with something like a /say command as Budderman mentioned that kill does not work for creative players
This mc bedrock video explaining the execute command supports the command I gave.
Try replacing the kill command with something like a /say command as Budderman mentioned that kill does not work for creative players

at means a desired entity's position. as is what entity runs the command. If you do it this way it will not work if the player isn't opped.

The as selector should be able to work on unopped players otherwise maps and commands relating to entities/mobs (as @e etc) would fall apart. The official wiki page also has no mention that the player has to be opped
You are indeed correct that the context was updated to the entity's position and that is my error.
You are indeed correct that the context was updated to the entity's position and that is my error.