How do I keep my camera on scriptable mode without ruining everything?

So I was making an NPC system and for that my camera needs to be scriptable. For some reason this thing is happening:

How do I stop this from happening while keeping the camera Scriptable?
File:
Yay (1).rbxl (56.9 KB)
Also do you know what a .rbxl.lock file is?
It comes along with my .rbxl file.

1 Like

try to make it scriptable on a localscript

I tried it and it gave me a bunch of errors and broke the game.

try smth like:

--try adding this on startergui
spawn(function()
    wait(1)
    
    local Camera = game.Workspace.CurrentCamera
    
    if Camera then
        Camera.CameraType = Enum.CameraType.Scriptable
        wait(3)
        Camera.CameraType = Enum.CameraType.Custom
    end
end)
1 Like

I tried it and it had the same result as if I just changed it from workspace.

1 Like

how do you want it to change then?

1 Like

In studio, it’s recommended to keep the CameraType of the Camera object to Fixed when editing. Make changes to the camera when the game runs in a LocalScript.

1 Like

I want to change it so that it does not wreck my NPC talking. If you walk up to the npc, you will see if it is anything but scriptable then it will not work.

1 Like

Oh. So you mean I keep it fixed while editing and change it during testing?

1 Like

I think the question to be asking here is: why do you need the camera to be in Scriptable mode? You’re not going to be able to adjust the angle of the camera while it’s in Scriptable mode, so there’s no solution to your problem. Figuring out the actual problem here is what needs to be done; and that’s asking why you need Scriptable mode on.

Google search, 5 seconds. “What is a lock file?”

1 Like

I do not know, but when I do it not scriptable mode then the NPC does not work. I google searched lock file and I did not get any results.

1 Like

You’re going to need to provide a whole lot more information then. There’s no way that your NPC isn’t working just because the camera mode isn’t Scriptable unless you’re relying on the CameraType in some fashion. There’s a deeper problem that needs to be analyzed here.

Also, there’s absolutely no way you didn’t find a search result after searching up lock file on Google. The very first result of “what is a lock file” is the explanation of a lock file. Did you actually search?

1 Like

I searched up rblx.lock file, not lock file. That is why I did not find an answer.

1 Like