No, It's a GUI button, I'm trying to assign multiple buttons to that function with a loop
I need to reference the button in the function so like:
Assume everything is defined right.
Children = GUI:GetChildren()
for i = 1, #Children do
Children[i].MouseButton1Click:connect(Clicked)
function Clicked(Part)
--Script
Children[i]:Destroy()
end
Using Children[i] won't work though. |