Hello Developers,
I’m creating this. It’s a kind of extension for plugins, a file explorer.
I need to detect when user press SHIFT key to know if he is selecting multiple Instances.
I have written this:
-- this is a server script
UserInputService.InputBegan:Connect(function(key)
print("key pressed")
if key.KeyCode == Enum.KeyCode.LeftShift then
ExplorerPlugin.isShiftDown = true
end
end)
UserInputService.InputEnded:Connect(function(key)
if key.KeyCode == Enum.KeyCode.LeftShift then
ExplorerPlugin.isShiftDown = false
end
end)
but when I press SHIFT or any other key, “key pressed” doesn’t print to the output. But if I close the explorer window, it print!
hey @Dede_4242 ! thank you for helping me, I just read this:
and also what you send me about plugin actions, but these action doesn’t fire when the user release the key, so I can’t use that
I think I have to look for an other solution…
However, thanks for the help
Oh, I’m sorry, I didn’t read the whole post as I’m not an expert and I wouldn’t get anything, I’m sorry, hope you are gonna be able to solve your problem