How Would Detect If a player is running a in straight Line
Also Making The Player WalkSpeed increase While Walking in that Line
Picture 1
Video
How Would Detect If a player is running a in straight Line
Also Making The Player WalkSpeed increase While Walking in that Line
Picture 1
Video
Sounds like inertia/momentum here are some resources that can help achieve that effect.
You can observe the player’s position delta and calculate if they are within a certain threshold in terms of x/z position
A straightforward solution would be to use UserInputService and maybe RunService to check if the user is holding down only one of the movement keys. However, this isn’t a very friendly solution if your game supports other devices, so I recommend exploring @CE0_OfTrolling’s suggestion.
Do characters turn in your game ? (no first person and no shiftlock)
If it is the case, you can just check if the rotation of the humanoidrootpart stays the same.
If it’s not the case, it’s a bit more complicated, I would recomment finding a way to get the player’s input or using unnoticeable vehicle seats and even inertia as @dthecoolest suggested…