It’s relatively easy once you understand where to look.
First open up your game and play it as a player.
Then head to your developer console and look for action bindings
In there you will see a list of all the player default bound actions.
From here you can take two different routes of disabling them.
One is to call the method ContextActionService:UnbindAction (actionName)
Second is to replace the default scripts. Simply insert a localscript into StarterPlayerScriptsnd call it CameraScript. That will disable ALL default camera functions so we can create our own.
Alternatively just use different keys. It’s not essential to unbind the keys unless they original keys are interfering with your camera system or do not work.
Finally you could simply call the
ContextActionService: BindActiomAtPriority along with the higher priority level than the normal one. The normal priority levels are usually 1000 or 2000
I’m also having issues with this and I can’t seem to get it to work. When a player gets to a certain area a gui with a local script is put into the player to handle the gui. This is part of the code in the local script.
It seems the Roblox bound zoom for I and O no longer work. But it doesn’t register that I and O are being pressed for InputBegan unless you’re holding down the Shift key.
Is this my midnight inability to comprehend or what? Lol.
local UserInputService = game:GetService("UserInputService")
game:GetService("ContextActionService"):UnbindAction("RbxCameraKeypress")
UserInputService.InputBegan:Connect(function(input, gameProcessed) -- InputBegan does not work for key I and O (zoom??)
if input.UserInputType == Enum.UserInputType.Keyboard then
print (input.KeyCode.Name.." BEGAN")
end
end)
If you are not planning on having your character moving, which probably is not your plan, I found a simple solution where I put a text box off screen and put a local script inside it containing the code: