--print("Cutscene should start now")

for i=1,#cutsceneinfo:GetChildren(),1 do
	camera.CFrame = cutsceneinfo:FindFirstChild("Position"..i).Value
	--print("Reached Position "..i)
	if i ~= #cutsceneinfo:GetChildren() then
		--Theres more coming, play a tween to the next position
		local tweentime = cutsceneinfo:FindFirstChild("Position"..i+1).Time.Value
		local easingstyle = EasingStyles[cutsceneinfo:FindFirstChild("Position"..i+1).EasingStyle.Value]
		local easingdirection = EasingDirections[cutsceneinfo:FindFirstChild("Position"..i+1).EasingDirection.Value]
		local cf = cutsceneinfo:FindFirstChild("Position"..i+1).Value
		game.TweenService:Create(camera,TweenInfo.new(tweentime,easingstyle,easingdirection),{CFrame=cf}):Play()
		wait(tweentime)
	else
		--The cutscene is over. Don't do anything after this point
	end
end

game.Workspace.CurrentCamera.CameraType = currentcameramode
game.Debris:AddItem(script)
