How to allow the mouse to move in Scriptable Camera

Hello there,

  1. I want to be able to move the mouse when camera’s type is Scriptable

  2. The issue is than I can’t move my mouse to click on the button
    Video.wmv (1.5 MB)

  3. I have literally no idea how to script this. I looked on the Developer Hub for solutions but I’ve found nothing.

Here is my script:

local part = script.Parent
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = part
part.Changed:Connect(function()
    camera.CFrame = part.CFrame
end)

Thanks! :smile:

1 Like

Hello Everyone,
I fixed the problem it was because of these lines:

player.CameraMaxZoomDistance = 0 -- It's because it was in First Person Mode I changed this value to something greater than 0 and it worked :D
player.CameraMinZoomDistance = 0
-- Here is the new code
player.CameraMaxZoomDistance = 10
player.CameraMinZoomDistance = 10