I am working on a simple run script, and using UserInputService to detect when the player presses LeftShift.
local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Enum.KeyCode.LeftShift then print("the player pressed shift!") end end
But, when I press LeftShift, I don't get anything in the output. So, if you have time, please help me out!
Thanks in advance!
(I put the code in a LocalScript inside of StarterGui)