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

How to "Lock" CameraSubject To Prevent Rotation??

Asked by 6 years ago

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
0
Enum.CameraType.Scriptable NiniBlackJackQc 1562 — 6y

1 answer

Log in to vote
2
Answered by 6 years ago
Edited 6 years ago

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
Ad

Answer this question