Example:If Key:"q" Does something.How do you do that please Help!
the script would look like this
1 | mouse = game.Players.LocalPlayer:GetMouse() |
2 | function onKeyDown(key) |
3 | if key = = "r" then |
4 | --code goes here |
5 | end |
6 | mouse.KeyDown:connect(onKeyDown) |
I usually use this:
1 | game.Players.LocalPlayer:GetMouse().KeyDown:connect( function (key) |
2 | if string.lower(key) = = "q" then |
3 | --do stuff |
4 | end |
5 | end ) |
You need to put it in a local script.