0

# [ANSWERED] I made a script with UserInputService. Why isn't this working?

Edited 3 days ago

I am working on a simple run script, and using UserInputService to detect when the player presses LeftShift.

Code:

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!