This question already has an answer here:

I am building a village in minecraft and in this village is a little restaurant called Ichiraku's Ramen what i want is when someone walks in it says Hi welcome to ichiraku's ramen, and another command block to say what would you like. but only with a 5 block radius. Please Answer.

marked as duplicate by galacticninja, Wondercricket, Dragonrage, Virusbomb, Joachim Jul 27 at 6:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Sep 4 '17 at 19:02
  • 2
    Like Frank said, we are not a forum. If you need help fixing a broken command we might be able to help, but we will not create things on demand. – rivermont - Will B. Sep 5 '17 at 2:11
  • 1
    You may want to read through this. gaming.meta.stackexchange.com/questions/13507/… – Dragonrage Jul 26 at 18:24
  • @Dragonrage Do you realize that this question was asked two years before the meta post you linked to? – pppery Jul 26 at 19:48

There is a command called /say. It works like /say @a[r=5] Hi welcome to ichiraku's ramen.

Place a command block that is under a block with a pressure plate on top outside of the door, so whenever someone walks past the door it will say "Hi welcome to ichiraku's ramen".

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