generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Tool mouse button and xbox RT button.

Previous Thread :: Next Thread 
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
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
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
04 Jan 2017 11:27 PM
It fires even if the tool isn't equipped.
Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
04 Jan 2017 11:33 PM
I've tried using if statements, breaks and all.
Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
04 Jan 2017 11:43 PM
b
Report Abuse
MasterXertz is not online. MasterXertz
Joined: 04 Jun 2010
Total Posts: 1499
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
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
05 Jan 2017 05:27 PM
Its fine, I figured it out. ;)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image