Help to script walkspeed

Them errors are not in that script. This is a basic sprint script.
If you’re changing speed with something else the script will not know that.
if you’re pressing the delete key it will always sprint …

1 Like

I didn’t say that you can help fix errors in this script?

I may have errors in my script, can you help fix it?

Looking at your video … there is no way that should be going back to sprinting unless you’re setting that from someplace else. I can see it’s not activating at the end yet still sprinting. That is not possible from the script. You must be setting that someplace else.

my agility addSpeed script

'local char = script.Parent
local humanoid = char:WaitForChild(“Humanoid”)
local player = game.Players:GetPlayerFromCharacter(char)

while wait(0.1) do
local speed = player.Agility
if speed.Value / 4 >= 16 then
local walkspeed = speed.Value / 4
humanoid.WalkSpeed = walkspeed
end
end’

The script I sent you don’t need anything else. What is this? Why are you doing this?
Are you making a program that has many different speeds? (as in more than the two)
Remove your agility addSpeed script and try again …

I am making a game similar to a super fighting simulator and there is such a script when a player runs, his script multiplies and after his speed has become higher, he will press the button and the button will reduce his speed by 16

Like I said, this download don’t need anything else. It is all in one.
Remove your agility addSpeed script and try again …

You may need to edit the script as I stated a few comments back.

and how do you think the players will gain speed?

“and how do you think the players will gain speed?”
When they press the sprint button or hold down the delete key.

You can’t have two scripts changing the speed and expect them both to work together.
My script is not made to have more speeds than the two stated.

Thank you, it worked , but can you make it so that when the player runs , the speed increases ?

Sure, start running then press the delete key or click the icon.

I mean, each time the increase was, let’s say, the player runs, he added x 2 speed, and so on

crèche help and with this I will click on the solution and thank you for everything that helped me

This is a totally different script.

I genuinely don’t know what he wants us to help with. He’s shifting his ideas.

If you want it to be doubled, you can just halve it then double it later.

local walkspeed = 16

walkspeed /= 2

print(walkspeed)
--8

walkspeed *= 2

print(walkspeed)
--16

it’s just that the player comes in, he has a speed of 2048, for example, and he has to pump it, thanks for writing the script, this is where the person threw off higher, yes, write?

I don’t know what you’re even talking about…

Where to write this script? that you sent me

I think he is saying you can build up more speed than what you started with. This has nothing to do with a “sprint” key you click to sprint. This would be a building effect based off “pumping it up”. In that case it would be a simple code to add to the walkspeed the more it is “pumped up”.