local dataLink = script["Data Link"].Value

local parts = {}

for _, child in pairs(script.Parent:GetChildren()) do
	if tonumber(child.Name) ~= nil then
		table.insert(parts, child)
	end
end

dataLink.dataSaveLocationSelected.changed:Connect(function()
	if dataLink.dataSaveLocationSelected.Value == 0 then
		for _, part in pairs(parts) do
			part.Material = Enum.Material.SmoothPlastic
		end

	else
		for _, part in pairs(parts) do
			part.Material = Enum.Material.SmoothPlastic
		end
		script.Parent[tostring(dataLink.dataSaveLocationSelected.Value)].Material = Enum.Material.Neon
	end
end)
