-2

I'm trying to make a minigame where when someone presses a button they join a team and teleport somewhere. I then want a chain command block to give them a book, but I want a specific team to get that item. Whenever I try doing it, it gives it to the wrong person.

I tried to use this command:

/give @p written_book 1 0 {author:Narrator,title:WereWolf,pages:["\".The goal of the werewolves is to decide together on one villager to secretly kill off during the night, while posing as villagers during the day so they're not killed off themselves."]}

I want to give the book to a certain team, but whenever I do like @a[team=Red] It doesn't work

  • Hi Allimant, what have you tried so far? – Joachim Jun 29 at 21:44
  • Or: how did you try doing it? – Joachim Jun 29 at 21:52
  • Should be pretty straightforward, so I assume you're doing something different. Please specify what you tried. – Fabian Röling Jun 29 at 22:43
  • I used this command, /give @p written_book 1 0 {author:Narrator,title:WereWolf,pages:["\". The goal of the werewolves is to decide together on one villager to secretly kill off during the night, while posing as villagers during the day so they're not killed off themselves."]} – Allimant Jun 29 at 23:13
  • I want it to give it to a certain, team but whenever I do like @a[team=Red] It doesn't work – Allimant Jun 29 at 23:16
1

You can use /give @p [r=40,x=X coordinate,y=y coordinate,z=z coordinate], followed by the item. Make sure to set x, y, and z to the middle of where each team spawns, assuming it’s a room. If not, do [r=5].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.