Hello! I have a whiteboard that I can paint on, which creates separate ImageLabels which can have different colours. However, I also have a clear button in SurfaceGui, which is supposed to clear all the ImageLabels from the board when it is clicked. It however, doesn’t work:
local children = script.Parent.Parent.Parent.Parent.SurfaceGui.Frame.Container:GetChildren() script.Parent.MouseButton1Click:Connect(function() for i = 1, #children do children[i]:Destroy() end end)
- The Container is the frame which stores all the separate ImageLabels, when a player paints on the Whiteboard.
I have tried Youtube and other resources, but haven’t been able to resolve the problem.
Any help is appreciated!
This is my first ever topic, so if the topic is in the wrong category/sub-catecory, notify me and I will try and change it