|
| 21 Jun 2013 08:43 PM |
| Is it possible to check if the player pressed any key instead of manually typing every letter? |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:44 PM |
mouse.KeyDown:connect(function(key) if key = "r" then --oasdijfioasdjfiosajfd end end) |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:45 PM |
KeyDown event fires whenever a key is pressed.
function kd(key) print(key) end
game.Players.LocalPlayer:GetMouse.KeyDown:connect(kd)
donut first, answer later |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:45 PM |
| That's not what I meant. Like if he pressed ANY key? Not one certain key. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:45 PM |
mouse.KeyDown:connect(function(key) --oasdijfioasdjfiosajfd end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jun 2013 08:46 PM |
@yomama - You didn't answer his question OR provide a functional script.
mouse.KeyDown:connect(function(key) --code here end)
The KeyDown event already fires when any key is pressed, so if you simply omit the if statement you normally use, you'll have what you want.
http://wiki.roblox.com/index.php/User:ElectricBlaze |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:47 PM |
Well, most keys at least.
http://wiki.roblox.com/index.php/KeyDown
donut first, answer later |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:47 PM |
Wow, one heck of a latepost...
http://wiki.roblox.com/index.php/User:ElectricBlaze |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:47 PM |
| that's the exact code I posted. /facedesk |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:48 PM |
@yomama - I was referring to your first post.
http://wiki.roblox.com/index.php/User:ElectricBlaze |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2013 08:49 PM |
| Oh, I see, forgot a second =, sorry |
|
|
| Report Abuse |
|
|