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

Help? Camera Lock?

Asked by 10 years ago
-- in a LocalScript
local camera = game.Workspace.CurrentCamera
camera.CameraSubject = game.Workspace["Korblox & Overseer & Redcliff Models"].Sparks

script.Parent["Intro Gui"]["Main Frame"]["Play Game Button"].MouseButton1Click:connect(function(playerCamera)
    game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
    game.Workspace.CurrentCamera.CameraType = "Custom"
end)

Is there a way to lock the camera so that the player cannot move it around with the right mouse button?

0
Try using LockFirstPerson, the setting the subject OniiCh_n 410 — 10y

2 answers

Log in to vote
3
Answered by
AmiracIe 175
10 years ago

Use "Scriptable" as your camera type.

Ad
Log in to vote
0
Answered by 10 years ago

Do

-- in a LocalScript
local camera = game.Workspace.CurrentCamera
camera.CameraSubject = game.Workspace["Korblox & Overseer & Redcliff Models"].Sparks

script.Parent["Intro Gui"]["Main Frame"]["Play Game Button"].MouseButton1Click:connect(function(playerCamera)
    game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
    game.Workspace.CurrentCamera.CameraType = "Scriptable"
end)

instead of

-- in a LocalScript
local camera = game.Workspace.CurrentCamera
camera.CameraSubject = game.Workspace["Korblox & Overseer & Redcliff Models"].Sparks

script.Parent["Intro Gui"]["Main Frame"]["Play Game Button"].MouseButton1Click:connect(function(playerCamera)
    game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
    game.Workspace.CurrentCamera.CameraType = "Custom"
end)

Answer this question