I'm sorry, this isn't scripting related but I don't know where else to post this. If anyone can tell me how I can mass delete items in the Explorer I would forever be grateful!
More Detail:
I have a folder with like 200 - 300 parts in it, each of those parts have 2 scripts in them, I made an error in 1 line of the scripts and need to replace it, how can I do this quickly without manually deleting every single one!
This is what I want to do (delete the selected): https://ibb.co/qMd8c6x
Except there are nearly 3 - 4 times the amount of Fields shown on the picture, each Field has the 2 scripts I want to delete: https://ibb.co/DgrfvWh
I would greatly appreciate anyone helping me, or guiding me to a site where I cold post this issue, thanks!
Here's an example of what you could do :
01 | for _, child in pairs (game.Workspace.TestFolder:GetChildren()) do |
02 | if child.Name = = "RandomPart" then |
03 | if child:FindFirstChild( "NonWorkingScript" ) then -- Detect the specific thing you want to delete |
04 | child.NonWorkingScript:Destroy() |
05 |
06 | local fixedScript = game.Workspace.WorkingScript:Clone() -- Clone the fixed script placed here in Workspace |
07 | fixedScript.Parent = child -- Place the cloned script inside child (here named RandomPart) |
08 | end |
09 | end |
10 | end |
Instruction : change the script for it to work for you then copy/paste it in the command bar when the game isn't running (you still must be in the Editing mode, not the Testing one), save & publish, restart the game and everything should be done