How do I use the scoreboard command to join a team?

I am trying to make it so that when a player steps on a pressure plate it activates a series of command blocks.

  1. /scoreboard teams join <team>
  2. /tp @p <x> <y> <z>

I am able to make the second command work but the join team command isn't working. What am I doing wrong?


When used in a command block, you need to specify the player(s) that you want to add to the team. The full syntax of the subcommand is:

scoreboard teams join <team> [player]

For your case, the following command should work:

scoreboard teams join <team> @p

(Remembering to replace <team> with the name of an actual team)