Detecting players in the area and automatically join team

Hello, I wonder, how does it work to detect the area who are in the area then make them automatically join? execute positioned (area) at @a[team=Starting,distance=3] run team join Game @s However, this seems to not work
Continue to help post