Minecraft Java Edition Commands – How to Fix Repeat Command Block Not Sending Out a Redstone Signal

minecraft-commandsminecraft-java-edition

So I was using a command block and I made it unconditional, repeat, and always active I put the command /execute if entity @p[distance=5] and I put a redstone comparator in front of it but when I walk near it, the redstone comparator doesn’t activate I need help.

Best Answer

You are checking if the nearest player is exactly 5 blocks away, to check if the nearest player is up to 5 blocks away you can use:

/execute if entity @p[distance=..5]