local Players = game.Players.LocalPlayer
local Character = Players.Character
local UserInputService = game:GetService("UserInputService")

--16 is walk speed
--20 is running speed
local CurrentSpeed = 20

UserInputService.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = CurrentSpeed
	end
end)

UserInputService.InputEnded:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = 16
	end
end)

This script saids "KeyCode is not a valid EnumItem"

Thanks for the help!

2 comments

1

I believe you just have to change ‘Enum.KeyCode.KeyCode.LeftShift’ to ‘Enum.KeyCode.LeftShift. It should work

0

Ha thats funny! Thanks