1

I want to do something with command blocks like:

/tellraw @a {"text":"[Name of person who activated the command block] Hello!"}

Without the person saying it themselves in the chat

2

1 Answer 1

1

If you don't need to use /tellraw you can use execute as @p[distance=..6,limit=1] run say hello in a command block and the closest player (probably the one that pushed the button) will appear to say hello. If you use a button for activation you could then do some more things with player's rotation and position (depending on what side of what block the button is on) to make it so the closest player has to be the one that clicked the button because of where the button is.

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