I want the input for the Two key to be able to be pressed while the Left Shift button is being held.
While holding Left Shift and pressing Two, Two was never inputted.
And so I did a little bit of experimenting: I simply pressed 1, 2 and 3 without holding left shift and pressed them again while holding left shift. Tested this with and without mouse lock and it made no difference.
I have found nothing alike to this problem on the dev forum, if there already exists the solution to this issue on another post, please tell me.
Written a simple script that prints whenever a valid button is being pressed and whether if the left shift key is being held down.
local Valid_Inputs = {
[Enum.KeyCode.One] = 1;
[Enum.KeyCode.Two] = 2;
[Enum.KeyCode.Three] = 3;
}
UserInputService.InputBegan:Connect(function(input, gpe)
if input.KeyCode == Enum.KeyCode.LeftShift then
return print("Pressing LeftShift")
end
if not Valid_Inputs[input.KeyCode] then return end
print(Valid_Inputs[input.KeyCode])
end)
UserInputService.InputEnded:Connect(function(input, gpe)
if input.KeyCode == Enum.KeyCode.LeftShift then
print("Off LeftShift")
end
end)
While holding left shift and pressing valid keys (One, Two, Three), the Two key was never inputted.