I made a map and I'm trying to make something like this:

I need a command that will run when anyone enters certain area/coordinates, it will display colored text. I tried every command that I guessed it will work.(/execute -/tellraw -/testfor) But it didn't work. This is another example of what I tried: **\tellraw** command (*Colored Text*)

An example of what I'm trying to do:

If anybody enters 10 60 10 to 50 60 10 coordinates, a red colored text will say: "You're about to fall down!"

What is a functioning command

  • What is the actual command you tried? – Fabian Röling Jul 19 '17 at 15:47
  • Are you sure the range is from height 60 to height 60? That would mean that players who jump would be excluded. – Fabian Röling Jul 19 '17 at 15:48
  • Should it happen every time the enter or just once? – Fabian Röling Jul 19 '17 at 15:50
  • May not be possible without a large number of command blocks, will a radius work instead? – RS_Mind Jul 23 '17 at 5:49

I might know! You have to do radius though, here is the command:

/execute @a[x=-30,y=60,z=10,r=2] ~ ~ ~ tellraw @p ["",{"text":"You're about to fall down!","color":"dark_red"}]

EDIT: You have to put it in a command block that is Repeat Unconditional and Always Active, you can put it anywhere.

  • FYI you should not be using /execute like that. Only use /execute when the origin or executor needs to be changed, which is not the case here. Just move the selector from /execute into /tellraw. Also be aware that this just spams the player's chat rather than plays a single time when they enter the area. – Skylinerw Jul 23 '17 at 22:26
  • You're right but he can make something that prevents it from spamming. – IceBotYT Jul 26 '17 at 22:10

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.