raycast help


scoreboard players add .distance raycast 1

execute as @e[tag=!raycasting,type=!weapontest:not_mob,dx=0] positioned ~-0.99 ~-0.99 ~-0.99 if entity @s[dx=0] positioned ~0.99 ~0.99 ~0.99 run say hit

execute if score .distance raycast matches ..1000 positioned ^ ^ ^0.1 rotated ~ ~ if block ~ ~ ~ weapontest:raycast_pass run function weapontest:raycast

this function isnt running for some reason

Continue to help post