Camera not changing?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I have a line of code, but it will not move the player’s camera.

  2. What is the issue? Include screenshots / videos if possible!
    It doesn’t work.

Script:

cam.CameraSubject = CFrame.new(workspace.InsidePart.Position, workspace.FocusPart.Position)
1 Like

cam.CameraSubject is an ObjectValue. A CFrame isn’t an object. I think you meant to type cam.CFrame = CFrame.new(workspace.InsidePart.Position, workspace.FocusPart.Position)

It doesn’t seem to be working. The line is in a script in StarterCharacterScripts, is that correct?

1 Like

Ok, so a LocalScript inside of StarterGui, or StarterCharacterScripts is okay. Make it say this though:

local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = workspace.part name.CFrame

Hope this helps!

1 Like

It works, I forgot to change the camera type!

1 Like

Yeah, I was about to put a comment by that line saying “important” but I thought you might think that having a comment would be critical to the script working.

1 Like