:FindFirstChild in Parallel Luau

		task.desynchronize()
		
		local name = `{row}:{x}`
		local color = getColorFromPixelData(pixel)
						
		row = math.clamp(((x % width) == 0) and row + 1 or row, startRow, endRow)
				
		task.synchronize()
		
		local pixelFrame = Screen.Canvas:FindFirstChild(name) -- error here
						
		pixelFrame.BorderColor3 = color

in the line i marked as -- error here is where the error is (obviously), but when i checked the canvas itself, there is clearly the pixelFrame its trying to find, but it says its nil; i tried to swap it with :WaitForChild but it just says Infinite yield possible (which the instance is possibly non-existent)

i found out that SharedTable is designed for parallel luau cases, but I don’t really know how to use them and I can’t store instances in them?

i changed it to just do a for loop in a table filled with the pixelFrames; if anyone knows a better solution, please send it

		for x, pixelFrame in pixelFrames[row] do
			task.desynchronize()
			
			local pixel = rows[row]
			local color = getColorFromPixelData(pixel)
			
			task.synchronize()
			
			pixelFrame.BorderColor3 = color
		end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.