im really inexperienced so it would be great if someone helped and walked my through this!
local UserInputService = game:GetService("UserInputService")
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local isRunning = false
UserInputService.InputBegan:Connect(function(key)
if key.KeyCode == Enum.Keycode.LeftShift then
if not isRunning then
isRunning = true
Humanoid.Walkspeed = 32
else
Humanoid.Walkspeed = 16
isRunning = false
end
end
end)
(not mine)

1 comment
It should be KeyCode not Keycode; Lua is case sensitive.