-- NOTE: TEXTBOUNDS.X CANNOT BE MORE THAN TEXTLABEL.ABSOLUTESIZE.X OR YOU WILL GET UNDESIRABLE BEHAVIOR


local root = script.Parent

local surfaces = {
	'Front',
	'Left',
	'Back',
	'Right'
}

local speed = 2 -- how many seconds it should take to travel across one surface
local size = 2 -- the number of textlabels to move before and after the current one

function GetPreceedingLabels(index)
	local labels = {}
	
	for i=1,size do
		local this = index-i
		
		table.insert(labels, 
			root:FindFirstChild(surfaces[this] or surfaces[#surfaces+this], true).Frame.TextLabel
		)
	end
	
	return labels
end

function GetSucceedingLabels(index)
	local labels = {}
	
	for i=1,size do
		local this = index+i