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

How do I lock a camera in a certain spot?

Asked by 4 years ago

How do I lock a camera in a certain spot for my title screen project? I want a certain view from this point that cannot be moved at all. Any scripts help! Thanks!

0
Set the CameraType to Scriptable then the CFrame to your desired position SerpentineKing 3885 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Hello, so basically you use CameraType for that, then set your CFrame. Here is an example:

--local script
local player = game.Players.LocalPlayer
local currentcam = player.CurrentCamera

currentcam.CameraType = "Scriptable"

currentcam.CFrame = CFrame.new(Vector3.new(0,0,0)) -- Place your desired position in the 3 zeros section.

Hope it helps!

0
Don't use "CFrame.new(Vector3.new(0, 0, 0))". It's not how CFrame works. Instead, use "CFrame.new(0, 0, 0)". youtubemasterWOW 2741 — 4y
0
It should be Enum.CameraType.Scriptable, the CameraType is not a String SerpentineKing 3885 — 4y
Ad

Answer this question