|
| 04 Jan 2017 09:37 PM |
| When using UIS, what should I do to detect whether they put the mouse button down or the right trigger down on the xbox. I'm also trying to detect once they lift the trigger/mouse. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2017 09:53 PM |
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Gamepad1 then if input.KeyCode == Enum.KeyCode.ButtonR2 then --DO WHATEVER YOU WANT IT TO DO HERE end end end)
Looking for some quality games? | https://www.roblox.com/My/Groups.aspx?gid=1098962 |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2017 11:27 PM |
| It fires even if the tool isn't equipped. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2017 11:33 PM |
| I've tried using if statements, breaks and all. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jan 2017 03:10 PM |
so use if Tool.Equipped == true then
Looking for some quality games? | https://www.roblox.com/My/Groups.aspx?gid=1098962 |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2017 05:27 PM |
| Its fine, I figured it out. ;) |
|
|
| Report Abuse |
|
|