code isn't executing from Visual studio but from command block
i want to make this code run when i deal damage, it works when i put it in a command block as function bradslash1
this is the code scoreboard objectives add damage_dealt minecraft.custom:damage_dealt scoreboard objectives setdisplay sidebar damage_dealt
execute as @a if score @s damage_dealt matches 1..10000 run scoreboard players set @s damage_dealt 0
execute as @a if score @s damage_dealt matches 17..10000 run execute at @s run function brad:slash1
the function isnt running when i try it but i know it works because using the / function command or a comand block spawns it in
the function is a bunch of particles btw