Scoreboarding Being Set Weirdly

So I'm doing a quest system, it activated fine and it gave the player the quest somewhat, however once it got into setting the scoreboards it went rlly weird
Continue to help post