Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get Key Press By known person with UserInputService?

Of course if you:

print(game:GetService("UserInputService"):IsKeyDown() --a Random KeyCode Here

then you'll get that someone pressed a key. But who? How to find out who is pressing the keys? It would be useful, 'cause Getting Keyboard Input works bad, so I wanted to replace it with this.

Thanks,

SwaggyDuckie.

1 answer

✓ Accepted answer

UserInputService should only be used in a localscript anyways.

So you can just index the LocalPlayer of game.Players

local plr = game.Players.LocalPlayer

This discussion is preserved as it was. New answers, comments, and votes are closed.