Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to "Lock" CameraSubject To Prevent Rotation??

The script works fine, putting the camera as the subject. How do i make it so the player can not zoom in or move the camera at all (right clicking and dragging) without the jerking and glitching.

repeat wait() until game:GetService('ContentProvider').RequestQueueSize == 0

Focuspoint =  workspace.Lobbys:WaitForChild(game:GetService('Players').LocalPlayer.Name.."'s Lobby").Stage.Focuspoint

while wait() do
cam = workspace.CurrentCamera
cam.CameraSubject = Focuspoint
cam.CameraType = Enum.CameraType.Attach
end

1 comment

0

Enum.CameraType.Scriptable

1 answer

✓ Accepted answer

I have removed "while wait() do" because is useless in this script

repeat wait() until game:GetService('ContentProvider').RequestQueueSize == 0

Focuspoint = workspace.Lobbys:WaitForChild(game:GetService('Players').LocalPlayer.Name.."'s Lobby").Stage.Focuspoint

local cam = workspace.CurrentCamera
cam.CameraSubject = Focuspoint
wait() -- For allow CameraSubject get Focuspoint
cam.CameraType = Enum.CameraType.Scriptable

This discussion is preserved as it was. New answers, comments, and votes are closed.