want to make a cooldown

i want to make a cooldown the way i tried it was by making the ability only trigger if a scoreboard = 0 and in the ability i made the score go up by 1 in the ability function and also aa schedule command to make another funtion set the score to 0 but it doesnt work

Continue to help post