of     1   

Whimzee
#36338725Monday, November 01, 2010 12:36 PM GMT

function cleanUp() local search = game.Workspace:getChildren() for i=1,#search do if (search[i].className == "Tool") then search[i]:remove() print("Removed unused tools.") script.Parent.Parent:remove() end end else script.Parent.Parent:remove() end end end script.Parent.MouseButton1Click:connect(cleanUp) How many ends should it be, And where?
RageMoar
#36338775Monday, November 01, 2010 12:39 PM GMT

You need an end for every for and while loop. You need an end for every function. You need an end for every if statement. You need an until for every repeat loop.
Whimzee
#36338802Monday, November 01, 2010 12:41 PM GMT

I know. Somehow I got lost. And I don't know how many ends. SO HELP ME. I ALREADY KNEW THAT.
RageMoar
#36338832Monday, November 01, 2010 12:43 PM GMT

Use tab to make things look neater.
Whimzee
#36338843Monday, November 01, 2010 12:43 PM GMT

I know. NEAT. Just tell me how to fix it and were done. kthx.
RageMoar
#36338849Monday, November 01, 2010 12:44 PM GMT

function cleanUp() local search = game.Workspace:getChildren() for i=1,#search do if (search[i].className == "Tool") then search[i]:remove() print("Removed unused tools.") script.Parent.Parent:remove() else script.Parent.Parent:remove() end end end script.Parent.MouseButton1Click:connect(cleanUp) ?
thenoobkiller
#36339021Monday, November 01, 2010 12:59 PM GMT

What is the script.Parent.Parent?

    of     1