Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Do I Remove Roblox's Set Xbox Controller Controls?

Hello. I was wondering about how to code custom Xbox controller controls. I already got some of the basics down, but when it comes to trying to re-code some of roblox's set controls I run into some trouble. For example: Roblox automatically sets reloading guns and tools to B on the controller. Let's say I wanted X to be the reload button instead of B, how would I remove roblox's set control and instead make the reload button X? I've been wanting to set my crouch and prone buttons to B so learning how to remove some of roblox's controls would be a huge help. Thank you!

1 answer

✓ Accepted answer

Use ContextActionService.

Example:

local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")

ContextActionService:UnbindAction("action here")

4 comments

0

Thank you for your answer. What if I just wanted to switch the B button to the X button? Not really unbind it, just move the action to another button?

0

ContextActionService:BindAction

0

Just unbind them and rebind them

0

okay thank you. I figured it out.

This discussion is preserved as it was. New answers, comments, and votes are closed.