Allow Player.DevCameraOcclusionMode to be set by regular localscripts

Currently, a player’s DevCameraOcclusionMode (Player | Documentation - Roblox Creator Hub) cannot be set by any localscripts. Attempting to do so throws a security permissions error. This makes it impossible to toggle the camera’s Invisicam mode at runtime. In a project I am working on, the functionality of Invisicam is desired in some rounds. One round features a semi-vertical camera view looking down on the player. When a player runs behind wall, the functionality of Invisicam allows the player to see where they are going. However, in other rounds, the functionality of Invisicam is not desired.

By allowing Player.DevCameraocclusionMode to be changed by a regular localscript, Invisicam can be toggled at runtime by the developer as desired.

9 Likes

Other properties such as DevMouseLock would also be super useful. Right now in our game we need to set it on the server every time a player enters a vehicle, because if we don’t, the mouse lock spins the entire vehicle around (lol) and sometimes still does because of client->server->client latency

5 Likes