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

How do I set the value of the walkspeed to the current walkspeed of the player?

Script:

BaseWalkSpeed = ; <-- need help on this one

SprintSpeed = 16;

AimedWalkSpeed = 10;

CrouchWalkSpeed = 7;

ProneWalkSpeed = 4;

1 answer

if Player.Character then
BaseWalkSpeed = Player.Character.Humanoid.WalkSpeed
end

If you want to get and change the player WalkSpeed in a script rather than a local script, here's an example of what you can do:

game.Players.PlayerAdded:Connect(function(plr)
	if plr.Character then
		BaseWalkSpeed = Player.Character.Humanoid.WalkSpeed
	end
--do the rest here
end)

By the way, the default WalkSpeed is 16 for a player. If this helped you, please accept it :)

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