/execute @p [tag=Visitor] ~1 ~ ~ /say Test doesn't work in Command Blocks

If I run this command normally it works: /execute @p [tag=Visitor] ~1 ~ ~ /say Test ... But if I try to run it in a command block it says: Syntax Error: Unexpected "]": at "xecute @s[>>]<<"


Solution 1:

The format that you used is the pre-1.13 command format. Instead of what you did, try this command:

/execute as @p[tag=Visitor] run /say Test