So I wanted to add a CTRL + Z shortcut, and while doing so I discovered that when you first hold left control, and then press any other key, then that key doesn’t register. But if you instead press Z and then CTRL, then it registers everything. Also, UIS:GetKeysPressed() suffers from the same issue.
Here’s a code that shows this behaviour:
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
RunService.Heartbeat:Connect(function()
local ctrl = UserInputService:IsKeyDown(Enum.KeyCode.LeftControl)
local z = UserInputService:IsKeyDown(Enum.KeyCode.Z)
warn(ctrl, z)
end)