I'm trying to make a vanilla KitPvP server, and I want to make a kit that gives you normal walking speed, but when you are sprinting, you have a speed boost. Is that possible? If so, then how?
Minecraft – How to you give a player a speed boost when they are sprinting in Minecraft
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – How to change the FOV but not speed using commands
- Minecraft – How Do You Automatically Give Players An Item When They Kill Another User
- Minecraft – (Bigger Question) Explanation and Questions for KitPVP
- Minecraft – How to give a player an effect when a egg is thrown
- Minecraft – How to give levitation to a player when the player is holding an item in his offhand
- Minecraft – How To Automatically make particles when a player Joins Using Commands On Minecraft Bedrock Edition
- Minecraft – How to give points when someone is standing near an item using Minecraft commands
Best Answer
First, add an objective to keep track of whether players are sprinting:
On a clock, give all players with a score in that objective of at least 1 the speed effect:
Then, also on the same clock, set the score to 0 for everyone so that the speed boost stops being applied when a player stops sprinting: