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.
--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)
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.
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.
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?”
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?