Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make walk speed increase while walking and reset?

Asked by 5 years ago

I'm attempting to change the WalkSpeed property by 0.2 every 0.5 seconds until the WalkSpeed equals to 20 however, after stopping the WalkSpeed will return to 16. I have looked everywhere to do something like this. Please don't see this as a request I just need something to help lead me into the right direction.

0
have you not attempted this your self? if so please post some code as well so people can help you properly, if you haven't then try it first and if it fails present us with the failed so we can point out what to do and maybe give you a solution FlabbyBoiii 81 — 5y
0
couple of errors in there, sorry FlabbyBoiii 81 — 5y

1 answer

Log in to vote
0
Answered by
Fifkee 2017 Community Moderator Moderation Voter
5 years ago

You'll need a humanoid signal called .Running.

It's used like this.

```lua game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local Humanoid = char:WaitForChild('Humanoid') Humanoid.Running:Connect(function(Speed) --//Speed is the walkspeed of the character. If the character is not running, it will return a very small number, if not zero. --//You could probably make a constant loop to check if the character is running or not, or simply use a .Changed function to check if the moveDirection is > Vector3.new(5,5,5), or so. It's your choice! if (Speed > 0) then print'Player is running!' else print'Player has stopped!' end end) end) end)

Ad

Answer this question