How would I make a commandblock do setblock at a certain player

I was using setblock a lot and playing around with it, until I came with the idea, what if I could use setblock
to make a game like Runner, from Mineplex, to make the blocks disappear when they run over it?
What command block setup would I use?
I was thinking about a testfor command which sends a signal when they are standing at the certain area {x=10,y=5,z=20}
and if the player stood on that block the testfor command should be sending a signal to another commandblock which does the following command: setblock 10 5 20 air
, but what if the signal wouldn't be fast enough, for example, when someone has speed II, how would I make a game like this then? Would it be more complicate, or harder to setup, would it take more commandblocks, a faster clock, what would it take?
Best Answer
Minecraft has 20 ticks 1 tick is 0,05 seconds you can build a 20hz clock by set a commandblock with the command setblock ~ ~1 ~ air and a 2nd commandblock two blocks over the 1st with the command setblock ~ ~ -1 ~ redstone_block then put a redstoneblock in the middle of the commandblocks and put a 3rd commandblock on the redstoneblock with the command execute @a[m=2] ~ ~ ~ setblock ~ ~-1 ~ air 0 destroy / replace
Pictures about "How would I make a commandblock do setblock at a certain player"



How do you make a Setblock command?
How to Enter the CommandHow do you get a command block to target a player?
@p (Nearest Player) If a command block has executed the command, the nearest player to the command block will be targeted. If you run a command from the Chat window, the player running the command will be the nearest player.How do you fill blocks relative to player?
To fill an area relative to the player, put the following code into a command block or your chat: /execute @<p,a,r,e> <x> <y> <z> /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> 0 replace <blocktoreplace> . The p, a, r, and e are the selectors.How do you make a player say something with a command block?
Using /say @p , the command block can report the nearest player. If the command block is placed after a finish line, it will say the finishers in order. Players can also do /tellraw @p {"text":"THIS IS A MESSAGE"} and when activated the message "THIS IS A MESSAGE" will come up on the chat system.Using Commands in Minecraft: How to Use /setblock \u0026 /fill to Alter Terrain! | 1.11.2
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Skylar Kang, Truman Rexti, David Morris, Kampus Production