of     1   

Gh0stist
#171166131Friday, August 14, 2015 5:56 PM GMT

Delete every child of 'Part' except for the clickdetector. bump
zarman3402
#171166304Friday, August 14, 2015 5:57 PM GMT

for i, v in pairs(game.Workspace.Part:GetChildren) do if v:IsA("BasePart") then v:Destroy() end end
Drakles
#171166326Friday, August 14, 2015 5:58 PM GMT

local part = game.Workspace.Part; for i,v in pairs(part:GetChildren()) do if v.ClassName ~= "Click Detector" then v:Destroy() end end Life is short, so grip it and rip it.
Gh0stist
#171166391Friday, August 14, 2015 5:58 PM GMT

thanks! bump
Gh0stist
#171166737Friday, August 14, 2015 6:01 PM GMT

Oh, it also deletes the clickdetector. bump
Drakles
#171166871Friday, August 14, 2015 6:03 PM GMT

It might be className rather than ClassName. Life is short, so grip it and rip it.
Gh0stist
#171167016Friday, August 14, 2015 6:04 PM GMT

It works fine in the first click, but in the second click, it deletes the clickdetector. bump
Gh0stist
#171167421Friday, August 14, 2015 6:08 PM GMT

Any ideas? bump
Gh0stist
#171167627Friday, August 14, 2015 6:09 PM GMT

bump
ray_revenge
#171167761Friday, August 14, 2015 6:11 PM GMT

local part = game.Workspace.Part; for _,v in ipairs(part:GetChildren()) do if not v:IsA("ClickDetector") then v:Destroy() end end
TimeTicks
#171167803Friday, August 14, 2015 6:11 PM GMT

script.Parent.ClickDetector.MouseClick:connect(function(player) for i,v in next, script.Parent:GetChildren() do if not v:IsA("ClickDetector") then v:Destroy() end end end) "Talk is cheap. Show me the code." - Linus Torvalds
Gh0stist
#171168130Friday, August 14, 2015 6:14 PM GMT

Ok thanks, works now. bump

    of     1