How do I make a "slowly gain walkspeed when walking" script?

Hey all!
Recently I’ve been messing with ROBLOX’s physics and making cool stuff, like custom animations, wall sliding, diving, and more!
But I wanted to make a “slowly gain walkspeed when walking” script, and each time I tried to make one it wouldn’t work.

Any help/suggestions would be appreciated!

try this
Humanoid.WalkSpeed = 10

Did you read the title? Because that’s no where near it.

To do this add a script inside server script service and add the following:

P.S. this script allows you to make the player’s walkspeed higher by 1 every second.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character.Humanoid
		
		while wait(1) do
			humanoid.WalkSpeed = humanoid.WalkSpeed + 1 --you can change the number to what you desire
			print("Increased")
		end
	end)
end)

This is a quick script I whipped up inside the server script service.

Not sure if this is what you wanted, but you can use it if you want.

Woops yeah that isn’t what I wanted…

Ahh sorry if I couldn’t help…

Oops sorry:
local Player = game.Players.LocalPlayer
local Character = game.Players.LocalPlayer.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild(“Humanoid”)
local IsWalking = IsWalkingListner(Humanoid)

while true do
wait()
if IsWalking() then
Humanoid.WalkSpeed = Humanoid.WalkSpeed
wait(1)
end
end

1 Like

I think all I needed was the IsWalking() function

I need to learn more scripting

You can use Humanoid.Running:Wait() to change the walkspeed while humanoid is walking:

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.WalkSpeed = 1
while true do
	Humanoid.Running:Wait()
	wait(1)
	Humanoid.WalkSpeed += 1
end

1 Like

Once the player runs it just keeps going up. And it needs to be when you stop, your walkspeed goes down to the normal amount (16 for me)

Then you can check player’s Velocity to determine if player is walking or not.

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character.HumanoidRootPart
Humanoid.WalkSpeed = 16
while true do
	if HumanoidRootPart.Velocity.X == 0 and HumanoidRootPart.Velocity.Z == 0 then
		Humanoid.WalkSpeed = 16
		Humanoid.Running:Wait()
	else
		wait(1)
		Humanoid.WalkSpeed += 1
	end
end
3 Likes

Perfect! Thanks so much! Have a great day.