Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What did i do wrong in this script?

Asked by 9 years ago
function onButtonClicked()

Children = script.Parent.Parent:GetChildren()
for i = 1, #Children do
            if Children[i]:IsA("ImageButton") then 
                Children[i]:Destroy()
end
script.Parent.MouseButton1Down:connect(onButtonClicked)


I'm trying to make it remove ImageButtons If a player clicks it

0
You forgot to add the 'end''s for the 'for' loop and 'if' statement. TheeDeathCaster 2368 — 9y
0
^ exactly. use the output to find out what is wrong: http://wiki.roblox.com/index.php?title=Output Tesouro 407 — 9y

Answer this question