Minecraft – How to Make Arrows Despawn Faster in Minecraft?

minecraft-commandsminecraft-java-edition

Here is some context: I've made some command block code to make lightning arrows. However, I want the arrows to instantaneously despawn after an arrow is shot. How do I do this?

Here is the command block code if you need it.

execute at @e[type=minecraft:arrow] run summon minecraft:lightning_bolt

Best Answer

 /execute as @e[type=minecraft:arrow] run data modify @s {Life:0}

This in another command block should instantly destroy every arrow. A similar command using /kill instead should also have the same effect.