here is the code I used:
game.Workspace.part.ClickDetector.MouseClick:Connect(function(player)
print ("TESTING")
game.Workspace.part.ClickDetector.parent = nil
end)
So far , the clickdetector is not gone after the click... no print has been made either.

2 comments
If no print has been made, are you sure that the ClickDetector is there? I suggest putting the script in the "part" and doing. script.Parent.ClickDetector.MouseClick:Connect...
ok thx