How can I activate a command block but only when players are around in 50 blocks? So he should spawn iron golems but only when players are 50 blocks away. Minecraft java version 1.14.4
Give it a try
/ testfor @a [radius = 50] and then set it to repeat and always active.
Then connect to another command block with a comparator and stop / summon iron_golem xyz
Congratulations, you have no idea.
Execute if entity @a [distance = .50] run summon iron_golem x y z