Minecraft – Can’t get scripted arrow to work

minecraft-java-edition

I'm trying to clone something when an arrow is fired.
I'm using this command:

execute as @e[type=minecraft:arrow] run clone 90 56 33 107 59 30 ~ ~ ~

But it isn't doing anything at all when I fire an arrow.
It's in a repeating command block, by the way.

Best Answer

Make sure that your repeating command block either has a redstone signal, or is set to always active.

The command will also fail if the coordinates 90 56 33 107 59 30 are too far away.

Try to use at instead of as.

If you use as, then your command executes as all arrows, at the location of your command block.
If you use at, then your command executes as the command block, at the loaction of every arrow.

The command that you currently have should do something once, it should clone whatever is at 90 56 33 107 59 30 to the location of your command block, which effectively replaces the command block with the block at 90 56 30.