Trying to figure what's wrong here

I am using this scoreboard to help keep track of some objectives for a minigame I'm making. The issue is I can run this command in game and it functions as intended, but when I add it to the datapack it just doesn't...anyone know why? execute as @a[team=Classmates,distance=..5] if entity @e[type=goat,distance=..5] run scoreboard players add @s sacrifice 1
Continue to help post