created a screen GUI and when you press the clear button it's supposed to clear it but nothing happens, could someone help me?

for i, v in pairs(workspace.Important.OrderScreen.main.Orders:GetChildren()) do
	if  v.Name ~= "UIListLayout" then
		v.ClearOrder.Activated:connect(function()
				orders[v.Name] = false
				v.Visible = false
				v.OrderText.Text = ''
				v.TableText.Text = ''
		end)
	end
end

5 comments

0

R u doing it in starter gui and not the player gui?

0

It's a ScreenGui on a TV

0

the for loop only runs once, so that means you literally have no time to press the button when the loop runs

0

That didn't fix it, because once you call it it actively listens for it to be activated and should run the code once it is.

0

cant you use gui.mousebutton1click?