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

How do I make it to where the Manipulated camera turns left and right?

Asked by 7 years ago

So basically I'm trying to make a code that will allow me to click on a Button on a Brick and it turns the camera left or right. I have this script already to manipulate the camera to look at the main screen

local cameraHeight = 12
local cameraZOffset = 20
local cameraXOffset = 0

local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer

local function setupCamera()
    camera.CFrame = CFrame.new(Vector3.new(0,cameraHeight,cameraZOffset), Vector3.new(0,cameraHeight,0))
end
setupCamera()
player.CharacterAdded:connect(setupCamera)

So if anyone can help me tha'd be great! Here's a video and picture of basically what I'm trying to do. (https://gyazo.com/c55fd8e77602e593c45d441aa0c5b12c) ^ Picture (https://gyazo.com/47f630534bb18a6e5d76848609c91487) ^Video

Answer this question