Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I change the Walkspeed of the Player?

I can't figure out how to make a Player walk slower or faster than normal. I don't think I need a script I just can't figure out if I need to change something or what?

1 answer

✓ Accepted answer

The walkspeed property can be adjusted in the "Humanoid" object. The humanoid is in every player.

If you're in a server, then your walkspeed should be here:

game < Workspace < FastSnail5 < Humanoid < Walkspeed < Value

game < Workspace < [Model] < [Object] < [Property] < [Value]

EDIT: You can manipulate your character's walkspeed in many ways. It can be an outside source, a tool, or a gui.

Example of WalkSpeed Change Via External Source

debounce = true							-- Debounce variable (so your function doesn't repeat itself)
function YourWalkspeedIsChanged(hit)	-- Function, with "hit" being the argument (or the object that touches your part)
	if hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true then -- Seeing if there's humanoid
		debounce = false					-- "Locks" function, so it won't repeat
		hit.Parent.Humanoid.WalkSpeed = 5	-- Changes the walkspeed
		wait(5)
		hit.Parent.Humanoid.WalkSpeed = 16	-- Reverts to default speed
		debounce = true					-- "Unlocks" function, so the function can run again
	end
end

script.Parent.Touched:connect(YourWalkspeedIsChanged)	-- Connection line, to run the function

Example of WalkSpeed Change Via GUI (TextButton)

game > Players > LocalPlayer > PlayerGui > ScreenGui > TextButton/Script

function WalkSpeed()
	game.Players.LocalPlayer.Character.Humanoid.Walkspeed = 25
end

script.Parent.TextButton.MouseButton1Click:connect(WalkSpeed)

5 comments

0

Yeah i understand the concept of humanoids and properties and stuff i just didnt know how to go about writing a script that would allow me to do wut i wanted to do

0

I'm just a beginnner in scripting

0

All right, so I've edited my post so you could see examples of how you could change your walkspeed.

0

I understand this.. Im trying to make it so each time you drink you get a little walkspeed. Not each time you drink it sets it to 25.

0

Make sure when you change the walk speed that it is "WalkSpeed" and not "walkspeed"

This discussion is preserved as it was. New answers, comments, and votes are closed.