Minecraft – Problem with Minecraft execute command

minecraft-commandsminecraft-java-edition

I have a clock leading to a command block with this command:

/execute @p[r=4] ~ ~ ~ /tp @p ~-20 ~-5 ~

But when I get within 4 blocks nothing happens, the previous output box is blank.
What can I do to fix it?

Best Answer

Just do:

/tp @p[r=5] ~-20 ~-5 ~