Player can move his camera even when it's Scriptable

Okay so I’m firing a remote that makes the player’s camera lock in a part, although even tho the camera mode is scriptable the player can move the camera freely.

My code :

if Camera and part then



			Camera.CameraType = Enum.CameraType.Scriptable
			Camera.CameraSubject = part
			Camera.CFrame = part.CFrame



		end

Are you firing the Remote event when the Player joins? if so you have to wait abit since Roblox adjusts the Camera to the Player after he joins Preferably I recommend using repeat wait until.

if Camera and part then
repeat task.wait() Camera.CameraType = Enum.CameraType.Custom until Camera.CameraType == Enum.CameraType.Scriptable

			Camera.CameraType = Enum.CameraType.Scriptable
			Camera.CameraSubject = part
			Camera.CFrame = part.CFrame



		end

Also are you firing this Remote event to a local script? If not Set the Camera type on the Client not Server.

I found the issue, it was actually a script that was editing the camera type back to custom, thank you for the help and sorry for the waste of time!