How to stop camera from rotating when mobile player is dragging an item?

I am creating a drag system that needs to be mobile friendly. How can I prevent camera from rotating when player drags item across their screen?

I also want the camera to still follow the player as they move and ideally the player can still move the camera with a second finger, not the first finger that’s dragging the item.

you should be able to just set the cameratype to scriptable and revert it once they’ve dropped the item to prevent the camera from moving

edit: wow i can’t believe i just totally missed the second part my first read-thru. my answer is kinda redundant though because spoodr’s reply covers pretty much everything perfectly lol

When you start dragging, you can set your camera to scriptable and then store the current camera angle and position offset from character root.

Then in a loop you can keep updating the camera to move with player

local offset = camera.CFrame.Position - root.CFrame.Position
angle = cam.CFrame - cam.CFrame.Position

--- Loop

camera.CFrame = CFrame.new(offset+root.CFrame.Position) * angle

Now for camera to rotate with second finger, I assume you can use the TouchRotate event of UserInputService (I am not that aware of mobile events). This event fires when two fingers attempt to rotate on screen. Since your one finger is already dragging , I believe this should work. You could try getting the delta of second finger to rotate the variable angle.

I am not sure if there is any other easier way.