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)
Your Keycode is suppose to be KeyCode so its
if key.KeyCode == Enum.KeyCode.LeftShift