Shift to run
Code is not working
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local UserInputService = game:GetService('UserInputService')
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
Enum.KeyCode.W = true
elseif Key:byte() == 48 then
Enum.KeyCode.LeftShift = true
end
if input.KeyCode == Enum.KeyCode.LeftShift then
Player.Character.Humanoid.WalkSpeed = 38
end
end)
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
input.KeyCode = Enum.KeyCode.W == false
elseif Key:byte() == 48 then
input.KeyCode = Enum.KeyCode.LeftShift == false
end
if not input.KeyCode == Enum.KeyCode.W or not input.KeyCode == Enum.KeyCode. LeftShift then
Player.Character.Humanoid.WalkSpeed = 16
end
end)

2 comments
I learned from senior programmers that keydown is depreciated, going to change the script now
Hey, I'm not that old.