I've been trying many methods, none of them work. I'm not asking for a script I am asking for a direction that works. Thank you.
EDIT:
I made a script, but it still doesn't seem to work.
local userinput = game:GetService("UserInputService") local hum = game.Players.LocalPlayer.Character.Humanoid userinput.InputBegan:connect(function(input) if Enum.KeyCode.LeftShift then hum.WalkSpeed = 60 else hum.WalkSpeed = 16 end end)
Hey VVired,
local uis = game:GetService("UserInputService") -- Declares a variable for UserInputService uis.InputBegan:Connect(function(obj, gp) -- Declares the anonymous function. if obj.KeyCode == Enum.KeyCode.Q and not gp then -- Checks if 'Q' was pressed and checks if 'Q' was meant to be pressed. If 'Q' was pressed while typing in chat, this if statement shouldn't allow the function to proceed any further. print("Q was pressed.") -- Prints "Q was pressed." in the output. end -- end for the if statement end) -- end for the anonymous function. That parenthesis is necessary because, that's how you end anonymous functions.
~~ KingLoneCat