as stated in the title I want to make a arrow that executes a command on all entities in a certain range of the arrow, the range I would like to be 10x10 from the center of the arrow. but I have not been able to get it working.
execute as @e[type=spectral_arrow,tag=ShotFromLightningBow] at @s run execute as @e[tag=!MageAlly,distance=10..10] run effect give @s wither 5 5 true
This is what I tried last.
Your problem is in the distance tag.
distance=a..bmeans the distance to the entity must be between the numbers a and b (both inclusive). In your command both are 10, meaning the effect only gets applied to entities with a distance of exactly 10 blocks. You proboably want to dodistance=..a, which means all entities that are at most a blocks away.