I am currently making a trolly Minecraft parkour map. I have two blocks, one on each side, so the players can jump to either side. I want to make it so when they jump on either of these blocks, the block is filled with air and they fall to their death. :) However, I cant figure out how to use the /detect command. Please help me. Thanks.
/detect is not a command on it's own. it's a subcommand of
I think what you want is as simple as
/execute @a[..] ~ ~ ~ detect ~ ~-1 ~ <block> <blockstate> /setblock ~ ~-1 ~ air
<block> with the block you're trying to detect and the
<blockstate> with the respective blockstate (or a
* for "doesn't matter which blockstate").
/execute @a ~ ~ ~ detect ~ ~-1 ~ stone * /setblock ~ ~-1 ~ air
this command will replace any stone block any player is trying to stand on with air.