M_FG
|
  |
| Joined: 10 Jul 2016 |
| Total Posts: 18 |
|
|
| 16 Jun 2017 01:37 PM |
Looking for a script where you push the dpad down and it activates a key
Ex pushing left on dpad would be like pushing x on a keyboard
Controls Right on dpad = x key Left on Dpad = f key Up on Dpad = h key Down on Dpad = c key |
|
|
| Report Abuse |
|
|
ITBV
|
  |
| Joined: 27 Dec 2013 |
| Total Posts: 954 |
|
|
| 16 Jun 2017 01:41 PM |
| Look into UserInputService |
|
|
| Report Abuse |
|
|
ITBV
|
  |
| Joined: 27 Dec 2013 |
| Total Posts: 954 |
|
|
| 16 Jun 2017 01:45 PM |
| local UserInputService = game:GetService("UserInputService") local function Action1() -- Stuff end local function Action2() -- Stuff end local function Action3) -- Stuff end local function Action4() -- Stuff end UserInputService.InputBegan:Connect(function(input) if input == Enum.KeyCode.X or input == Enum.KeyCode.DPadRight then Action1() elseif input == Enum.KeyCode.F or input == Enum.KeyCode.DPadLeft then Action2() elseif input == ############## ## input == Enum.KeyCode.DPadUp then Action3() elseif input == Enum.KeyCode.C or input == Enum.KeyCode.DPadDown then Action4() end end) |
|
|
| Report Abuse |
|
|
M_FG
|
  |
| Joined: 10 Jul 2016 |
| Total Posts: 18 |
|
|
| 16 Jun 2017 02:06 PM |
| Could you put it into a script file? |
|
|
| Report Abuse |
|
|
ITBV
|
  |
| Joined: 27 Dec 2013 |
| Total Posts: 954 |
|
| |
|
M_FG
|
  |
| Joined: 10 Jul 2016 |
| Total Posts: 18 |
|
| |
|