Insufficient Permissions

So for some reason I can’t switch the DevCameraOcclusionModes, any reason why?


ERROR: 
  17:52:41.484   Insufficent permissions to set DevCameraOcclusionMode  -  Studio
  17:52:41.485  The current thread cannot set 'DevCameraOcclusionMode' (lacking capability RobloxScript)

    if player:FindFirstChild("c") then
		if player.c.Value then
			player.DevCameraOcclusionMode = "Zoom"
			newPlayer = player.c.Value
			if not camera then -- CAMERA
				camera = workspace.CurrentCamera
				camera.CameraType = "Scriptable"
			else
				camera.CameraType = "Scriptable"
			end
		else
			player.DevCameraOcclusionMode = "Invisicam"
			newPlayer = nil
			workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
			workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
		end
	else
		player.DevCameraOcclusionMode = "Invisicam"
		newPlayer = nil
		workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
		workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
	end

You can’t change that property.

Try changing the StarterPlayer.DevCameraOcclusionMode instead, or implement your own Occlusion script.

This works only with a server script, meaning that if you have a local script, you need to transfer it to the server script to switch the camera

1 Like

That is not true. The answer by Brylan_Leske covers that already. DevCameraOcclusionMode is restricted to core scripts by Roblox.

https://youtu.be/VG91KqH_j_k


But in practice, it works

1 Like