I'm creating an RPG map and I need a command block to detect if a player is near specific coordinates, but I cannot work with specific numbers, I need it to be relative to the command block position. For example, in this command that does not work:
/execute at block ~3 ~2 ~-1 run execute if entity @p[team=Player01,distance=..5]
The current command I'm using is this one:
/execute if entity @a[team=Player01,distance=..5]
I've already searched about execute relative to command block but it´s the opposite scenario. I need the detection to be relative to the command block.