Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Camera CFrame isn't changing?

Asked by 3 years ago

When I set my camera's CFrame to a part, it's not changing and it just gets fixed on the humanoid that it was on before.

wait(5)
local currentCam = game.Workspace.CurrentCamera
local camObj = game.Workspace.Camera
currentCam.CameraType = Enum.CameraType.Scriptable
currentCam.CameraSubject = camObj
currentCam.CFrame = camObj.CFrame
currentCam.Focus = camObj.CFrame

2 answers

Log in to vote
1
Answered by
Zero_Tsou 175
3 years ago
Edited 3 years ago

I think its because of the "CamObj" game.Workspace.Camera already exists and its the "CurrentCamera" not the Part, You need to rename it ( the part ) to a different name

if This helped you Please accept it as an answer

Ad
Log in to vote
0
Answered by 3 years ago

Solved it myself: My part was named Camera so I was indexing the actual camera object instead of the part itself.

Answer this question