Command blocks are confusing me

hey. is there a way to make an (for example) repetition command block by distance affect two players at the same time?
I have two command blocks.
one has something like execute @p[distance=..20] if scoreboard blackmusic matches 1700 run playsound blackmarket:music @s ~ ~ ~ 0.5
the other one is similar but it adds to the timer
the problem is when i have two players in the same place it wont affect both
another problem i have is making tp command blocks it affects the nearest player not the one who pressed it.
Was this page helpful?