Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont this print? I have no errors and i can't find help on these things elsewhere

Asked by 3 years ago
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftControl then
    print("LeftControl")    
    end
end)
0
Run it on a localscript 0hsa 193 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

The script has to be run on a LocalScript; UserInputService is only available through the Client.

Ad

Answer this question