I wanted that every time I leftclick/Activate the Tool, a Part gets Destroyed. So I put some Parts in a Folder and made it a Table ("PartTable"). I then proceeded with a function which runs an in pairs loop to delete one Part out of the folder and break. That's because I didn't want one click deleting everything, there is no fun in that. I also made the system print whenever I delete a Part. Against my expectation it just worked once. Only one Part gets deleted, while the system keeps printing, when I click.
Look at me being disappointed
1 local PartTable = game.Workspace.Folder:GetChildren()
2 local Tool = script.Parent
3
4 Tool.Activated:Connect(function()
5 for i, v in pairs(PartTable) do
6 v:Destroy()
7 print("Part deleted")
8 break
9 end
10 end)
I am also like a complete beginner in scripting. Sorry for that