FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
|
| 20 Jan 2016 10:07 PM |
I think my last few threads have missed out this detail. Just making sure with this post.
You know how when you use mouse.Button1Down:connect(function() and fill in your commands so that it does what you wish when you click? What is used so you can do this with the keyboard, as in when I press a button (let's say E) what I want happens?
TL;DR how to do mouse.Button1Down:connect but by pressing a specific button (say, E) instead
(sorry if you saw my last post and I just didn't follow your directions right)
|
|
|
| Report Abuse |
|
|
FrostOver
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 299 |
|
|
| 20 Jan 2016 10:09 PM |
local Mouse = game.Players.LocalPlayer:GetMouse() Mouse.Button1Down:connect(function(key,a) if not a then local Key = key.KeyCode if Key == Enum.KeyCode.E then --code end end end) |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2016 10:10 PM |
| http://wiki.roblox.com/?title=API:Class/UserInputService |
|
|
| Report Abuse |
|
|
FrostOver
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 299 |
|
|
| 20 Jan 2016 10:12 PM |
ah crap i tottaly messed up game:GetService("UserInputService").InputBegan:connect(function(key,a) |
|
|
| Report Abuse |
|
|
FPSPwnz0r
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 2737 |
|
|
| 20 Jan 2016 11:22 PM |
heh, guess I just stink at scripting. I'll do more research. thanks anyways, I'll stop spamming this post
|
|
|
| Report Abuse |
|
|