Script won't Destroy() all ImageLabels using the GetChildren() Instance [SOLVED]

Probably is a issue with your variables or something you defined

@ScriptzO_0, the Script that is detecting the RemoteEvent doesn’t seem to be detecting it. This is despite me putting, the RemoteEvent right next to the Script. The LocalScript firing it seems to be working fine.

I have made both scripts print when they are working, but the LocalScript seems to be the only one that prints. No errors in the output

I fixed the LocalScript issue, (that wasn’t clearing the ImageLabels), and the script now works below:

local adornee = script.Parent.Parent.Parent.Adornee

script.Parent.MouseButton1Click:Connect(function()
	local children = adornee.SurfaceGui.Frame.Container:GetChildren()
	for _, child in ipairs(children) do
		child:Destroy()
	end
end)

The problem was because ‘Draw’, was being replicated, inside the player. This is because the players are interacting with the Whiteboard, client-sided. This meant that I needed to somehow refer back to the correct Whiteboard Model, inside of ‘Workspace’.

Additionally, I didn’t want to keep changing the name, for every individual Whiteboard, separately in the script. So to solve this problem, I decided to use the Adornee of ‘Draw’. This meant, that I didn’t have to get the name of the model, and is an advantage.

Therefore, I could now make multiple Whiteboards, without having to change the name to identify themselves, from each other.