|
| 01 Jan 2017 11:12 AM |
| Whats the keycode for e in userinputtype. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:16 AM |
I gave the answer in your last thread. It's 101.
You can find keycodes here: http://wiki.roblox.com/?title=API:Enum/KeyCode
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:18 AM |
uis.InputBegan:connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == 101 then
end end end)
So like this? because the one you gave me before didn't work it would trigger on any key. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:24 AM |
Bruh indent that code. But I guess that can work. If using numbers can get a bit annoying then you can do this:
local keys = { a = 97, b = 98, c = 99, d = 100, e = 101, --And so on and forth. }
uis.InputBegan:connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == keys[5] then --code end end end)
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:28 AM |
or if you don't want to worry about the confusing numbers just use Enum.KeyCode.E
Formerly ToxicDominator - add 30,319 posts |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:32 AM |
^ How the heck did I forget about that?! Fixed code:
uis.InputBegan:connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == Enum.KeyCode.E then --code end end end)
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 11:57 AM |
Oh i forgot about that too XD Its been a while since i scripted. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 12:46 PM |
I love enumerals <3
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 12:51 PM |
"enumeral" lol
Formerly ToxicDominator - add 30,319 posts |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2017 12:51 PM |
It sounds cool okay!
http://wiki.roblox.com |
|
|
| Report Abuse |
|
|