Disable Right Click move camera

I’m trying to make an RTS game with a fixed angle camera and I don’t want right click to be able to move the camera (without completely removing the ability to right click, as i want right click to perform various functions in my game)

I’ve looked up some solutions in the past but roblox has changed the default camera scripts and I don’t know which function to comment out to remove the camera panning abiity.

if someone could let me know which script and which function to replace/comment out/delete that would be epic

This code in my camera script works but it removes the ability to take input from mouse2 anywhere else as well:

ContextActionService:BindActionAtPriority(“NoRMBDrag”, function()

return Enum.ContextActionResult.Sink

end, false, Enum.ContextActionPriority.High.Value, Enum.UserInputType.MouseButton2)

2 Likes

Why not just change the camera type from Custom (or whatever the default was) to Scriptable?
https://developer.roblox.com/en-us/api-reference/property/Camera/CameraType

2 Likes

what the problem was:
the camera wasn’t properly getting set to scriptable. I had to do a repeat until loop to make sure it was getting set to scriptable

1 Like