How do I unbind a core button on the xbox controller?

  1. What do you want to achieve? Keep it simple and clear!
    I am trying to make a topview camera option for my golf game with xbox controllers.
  2. What is the issue? Include screenshots / videos if possible!
    I have bound the topview option button to R3, which also changes the zoom for the player on default camera, so when the xbox player wants to change the camera mode back to roblox’s, it might be zoomed into first person, which is kinda annoying after some time:
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I searched the wiki for any way to do this but with no results. Is there any way to unbind the roblox default camera zoom function from the R3 button? The other keys are already bound to other functions I made, like changing bats, applying curve or spin, special powers.
1 Like

I believe you can fix this issue. You would have to get Roblox’s core scripts, here is a quick video on how to do that:

I don’t know what code specifically to change, but I do know Roblox checks for things when the player spawns in so make sure to keep any functions.

1 Like

I had no idea this existed, thanks for sharing this, but there doesn’t seem to be an option to disable the camera zooming in when pressing down on the R3 Xbox button.

I believe Dfzoz wants the camera to be usable, just not the pressing down on the button part. I think the only way to do this is manually go into the “CameraInput” script and change the code for pressing down on the R3 button. ( If there is a better way to do this please tell me because I too have this issue. )

To restrict camera zooming use the above properties.

Okay, so I guess I have found it thanks to you. It’s on the CameraInputModule right here:


I still want them to be able to zoom, i just don’t want them to do so by pressing R3. I’ll figure out another option for them later.

1 Like

I found the code to change:

After you delete the stuff under the if statement on line 211, the R3 button does not zoom in. ( I just tested on an Xbox controller. )

I’ll actually add an if here (If player not inside map, do zoom, else, do nothing).

1 Like

Worked perfectly, now it only zooms when he isn’t playing. I’ll later edit this modulescript to try an alternative button to zoom in while playing.

1 Like