local userInputService = game:GetService("UserInputService") userInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftControl then print("LeftControl") end end)
The script has to be run on a LocalScript; UserInputService is only available through the Client.