Invis at any coordinates

Hey, this isnt a "datapack" issue but more of a command block (i know, i know). I am trying to make hiding spots, and want to make the player invisible when they go into a "wardrobe" I had an idea to place an armor stand with a tag and from its point make every player invisible Either my syntax is wrong or the idea is not working Can somebody help? Thanks in advance execute at @e[type=minecraft:armor_stand,tag=inv] run effect give @p[distance=..1] minecraft:invisibility 1 255 true
Continue to help post