How can I create a part in my game that influences the walkspeed of players based on their proximity? I want the walkspeed to increase gradually as the distance between the player and the part decreases. Specifically, when the distance is 10 studs, the walkspeed should be 16. When the distance is 5 studs, the walkspeed should be faster, like 20. And if the part is as close as 1 stud, the walkspeed should be set to 30.
The real thing I want to try is I made an npc to chase the player, I want to make the player run faster without having to press a key to run.
Look into .Magnitude.
You can calculate the length between the player and a part based on their Vector3 positions and change their speed based on the length or something like that.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.