How to display colored text to players when they enter a certain area/coordinates
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
Solution 1:
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.