-- Do not touch unless you know what you're doing.

local TweenService = game:GetService("TweenService")
local camera = workspace.Camera

function tween(part1, part2, cutsceneTime)
	local tweeninfo = TweenInfo.new(
		cutsceneTime,
		Enum.EasingStyle.Sine,
		Enum.EasingDirection.Out,
		0,
		false,
		0
	)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = part1.CFrame
	
	local tween = TweenService:Create(camera, tweeninfo, {CFrame = part2.CFrame})
	tween:Play()
	
	wait(cutsceneTime)
	
	camera.CameraType = Enum.CameraType.Custom
end

game.ReplicatedStorage.Cutscene.OnClientEvent:Connect(function()
	game.Workspace.Test1.Locked = true
	tween(game.Workspace.Test1, game.Workspace.Test2, 1)
	tween(game.Workspace.Test2, game.Workspace.Test3, 10)
end)
