Using my script, I guess you can achieve something like this:
local partA = workspace:WaitForChild("PartA",10) --Set the two parts.
local partB = workspace:WaitForChild("PartB",10)
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local cframes = { --Customise the parts' CFrames to set the camera to.
["CFrameA"] = {
["Position"] = {0,20,0},
["Orientation"] = {0,-90,0}
},
["CFrameB"] = {
["Position"] = {0,40,0},
["Orientation"] = {0,-90,0}
},
}
camera:GetPropertyChangedSignal("CameraType"):Wait()
camera.CameraType = Enum.CameraType.Scriptable
partA.Touched:Connect(function(otherPart)
if otherPart.Parent:FindFirstChildOfClass("Humanoid") then
camera.CFrame = CFrame.new(cframes.CFrameA.Position[1],cframes.CFrameA.Position[2],cframes.CFrameA.Position[3]) * CFrame.Angles(math.rad(cframe.CFrameA.Orientation[1]),(math.rad(cframe.CFrameA.Orientation[2]),(math.rad(cframe.CFrameA.Orientation[3]))
end
end)
partB.Touched:Connect(function(otherPart)
if otherPart.Parent:FindFirstChildOfClass("Humanoid") then
camera.CFrame = CFrame.new(cframes.CFrameB.Position[1],cframes.CFrameB.Position[2],cframes.CFrameB.Position[3]) * CFrame.Angles(math.rad(cframe.CFrameB.Orientation[1]),(math.rad(cframe.CFrameB.Orientation[2]),(math.rad(cframe.CFrameB.Orientation[3]))
end
end)