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: how do i add xbox controlsto my game?

Previous Thread :: Next Thread 
gummyxkiller is online. gummyxkiller
Joined: 28 Aug 2014
Total Posts: 138
12 Aug 2017 12:03 PM
how would a i add xbox controls to my game or see if the user is on a xbox?
Report Abuse
Aeureaus is not online. Aeureaus
Joined: 05 Nov 2011
Total Posts: 109
12 Aug 2017 01:16 PM
I highly recommend using the 'UserInputService'

Key Codes:
Y = ButtonY etc.
Bumpers are:
ButtonL1 etc.

D-Pad:
DPadDown etc.

For use: type Enum.KeyCode.[KeyCode]

You can bind a control by making a script like this:

local UserInput = game:GetService('UserInputService')


UserInput.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.ButtonA then
-- script
end
end)

For finding out if the user is on Controller then:

local UserInput = game:GetService('UserInputService')

UserInput.InputBegan:connect(function(key)
if key.UserInputType == Enum.UserInputType.Gamepad1 then
-- script
end
end)


Report Abuse
gummyxkiller is online. gummyxkiller
Joined: 28 Aug 2014
Total Posts: 138
29 Aug 2017 01:57 PM
the script that finds if they are on xbox is that put into a local script?


trying to get this higher :D// 0
Report Abuse
Aeureaus is not online. Aeureaus
Joined: 05 Nov 2011
Total Posts: 109
29 Aug 2017 01:59 PM
both local


Report Abuse
gummyxkiller is online. gummyxkiller
Joined: 28 Aug 2014
Total Posts: 138
29 Aug 2017 02:00 PM
do you want paided?


trying to get this higher :D// 0
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