How do I make another camera that rotates the same as the CurrentCamera?
Asked by
4 years ago Edited 4 years ago
I created a camera for a ViewportFrame and I was hoping that I could have my ViewportFrame camera's rotation sync with the Workspace's camera, but keep it's position the same. How could I do this?
Here's the code:
01 | local frame = script.Parent |
02 | local player = game.Players.LocalPlayer |
03 | local part = frame.Part |
04 | local questGoal = game.Workspace.QuestGoal |
05 | local workspaceCamera = game.Workspace.Camera |
06 | local camera = Instance.new( "Camera" ) |
08 | camera.CFrame = CFrame.new(Vector 3. new(- 2 , 0 , - 2 ), part.Position) |
09 | camera.CameraSubject = part |
11 | frame.CurrentCamera = camera |
14 | part.CFrame = CFrame.new(Vector 3. new( 0 , 0 , 0 ), questGoal.Position) |