Unable to apply effects on enemies when using custom sword data

Cannot figure out how to apply effects on other players using this datapack I've made
Continue to help post