So, I have everything down as far as the script working goes, it works perfectly, but there is a problem, right now I am using 2 functions, where pressing shift will make your speed faster, and pressing Q will return you to the default speed, but I need a sort of key code that means nothing is being pressed on the keyboard, and I am a bit confused as to how I would go about doing that, my script:
--prTESTAQ
local player = game.Players.LocalPlayer
local char = player.Character
local UIS = game:GetService("UserInputService")
local sped = 36
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
char.Humanoid.WalkSpeed = sped
end
end)
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.Q then
char.Humanoid.WalkSpeed = 16
end
end)