so i need an execute command that gonna detect a lighting bolt near every player on a server and give a speed effect to everybody who got struck. any ideas?
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
qualityvote22026-01-16 07:07
* Upvote this comment if this is a good quality post that fits the purpose of r/Minecraft
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
AmazingSetting38382026-01-16 07:11
You'll want something like \`execute as u/a at u/s if entity u/e\[type=lightning\_bolt,distance=..5\] run effect give u/s speed 20 2\`
Might need to mess with the distance value depending on how close you want them to be to the lightning
EstablishmentThin8072026-01-16 07:19
holy crap it works!! i tried something really simmiliar to that command... it did not worked. thank you so much!
Commentaires
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Might need to mess with the distance value depending on how close you want them to be to the lightning