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

How to lock a camera?

Asked by 9 years ago

Hello,

I have the below piece of code. Would it be possible to lock the camera in that position until the player clicks a GUI, and returns back to the humanoid? (I have the humanoid script)

local cam = workspace.CurrentCamera
cam.CameraSubject = workspace.BasePlate
cam.CameraType = "Fixed"
cam.CoordinateFrame=CFrame.new(-187, 90.5, 55.4)
cam.Focus=CFrame.new(-2.155, 59.062, 326.3)

Thanks.

1 answer

Log in to vote
1
Answered by
Wizzy011 245 Moderation Voter
9 years ago

Sure! The reason your camera isn't currently locked, is because you've got it set to the mode "Fixed" where it should actually be "Scriptable". This'll keep it in the same position until you change the script.

You already have the humanoid part, but yeah, you just put it back to "Custom"

Ad

Answer this question