Datapack working in singleplayer but not server

I have a datapack that i’m making that only works in my singleplayer world. Essentially I generated a book and whenever you click 1/4 options in the book it sets a scoreboard score 1-4 and puts you in that “mode”. Whenever you walk a certain distance in distance mode a function is supposed to run that tells you you earned a distance token, and give you one and this functions perfect in singleplayer. However, when I port it to my server, it stops functioning. It lets me switch between modes fine but it doesn’t track my score for any of the categories (distance walked, etc). Why may this be? I can provide any code u need to see to help
Continue to help post