I am trying to disable camera panning for mobile users when they equip a tool in my building game. The idea is that they can drag parts and blocks without the camera panning while they do so.
Through my research I came across this method, SetCameraPanMode() for the Camera.
It supposedly sets the CameraPanMode for mobile devices to be either Classic (enables camera panning) or EdgeBump (disables camera panning). But when I added this to my local script under the tool, it’s not disabling the camera at all.
Here’s my code (under an Equipped function for a tool in a local script):
workspace.CurrentCamera:SetCameraPanMode(Enum.CameraPanMode.EdgeBump)
Roblox’s documentation on this method: Camera | Roblox Creator Documentation
I’m thinking that I’m not using the syntax properly or I’m just completely trying to use this method wrong. Any help is appreciated or if you have any ideas on an alternative way to do this.