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

How can i change walkspeed for a specific tool?

What I mean by this is, when you equip the tool, you will either go faster, or slower, or unmovable.

3 comments

0

You can just do (In a LocalScript) - game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = VALUE (put this where the equipping of the tool happens) - 16 is default WalkSpeed.

0

Worked fine, but what I meant was you should able get back to default speed after unequipping

0

insert that code into the tool

1 answer

Sure you can. You need an event for when the tool is activated and a value to check when it's enabled or not.

local Tool = script.Parent
local plr = game:GetService('Players').LocalPlayer
local Enabled = false

Tool.Activated:Connect(function()
	if not Enabled then
		Enabled = true
		plr.Character.Humanoid.WalkSpeed = 25
	else
		Enabled = false
		plr.Character.Humanoid.WalkSpeed = 16
	end
end)

1 comment

0

Can you remove the numbers please?

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