spawn spider when cobweb is broken

so i have this code but its not exact is there a way to make it exact? execute as @r at @s if score @s cobwebbreak matches 1.. run summon spider ^ ^2.5 ^3
Continue to help post