I know this looks like a stupid question, but I cannot learn camera manipulation to save my life. I've tried so many things, but the camera just stays in the same spot(after i set its CFrame) no matter what. By the way, i have another script that destroys the players character. I've tried to manipulate the camera in another game of mine, but i just could not get it there either. Can some please tell me how set the CFrame correctly?
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable workspace.CurrentCamera.CameraSubject = nil vec1 = Vector3.new(0,8,-45) vec2 = Vector3.new(0,8,45) workspace.CurrentCamera.CFrame = CFrame.new(vec1,vec2)
Hi gdunn2. I am not a expert at camera manipulation but from your script, I see two issues.
The first issue is that you didn't give the CurrentCamera anytime to load in, try using a wait(2) before the script or you can write
cam = game.workspace:WaitForChild("CurrentCamera").
The second issue is on line 7, you are writing CFrame instead of CoordinateFrame. It should be this
workspace.CurrentCamera.CoordinateFrame = CFrame.new(vec1,vec2)
I'm not 100% certain is line 2 makes a difference since your camera mode is set to scriptable anyways, so I wouldn't change the camera subject. Overall your script should look like this
wait(2) workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable vec1 = Vector3.new(0,8,-45) vec2 = Vector3.new(0,8,45) workspace.CurrentCamera.CoordinateFrame = CFrame.new(vec1,vec2)
Sorry if this didn't help, I tried atleast and Happy Easter :D
You use CurrentCamera.CoordinateFrame to change the CFrame of the Camera.
workspace.CurrentCamera.CoordinateFrame = CFrame.new()