Delete multiple scripts?

so I need to delete like 100+ scripts is there a way to delete them all at once?
they all have the same name

If they are all under the same parent:

local Parent = workspace -- if they are all in workspace
local Name = "Generic" --Whatever the script's name is
for _, descendant in pairs(Parent:GetDescendants()) do
	if descendant.Name == Name then --Compare to see if they are the same
		descendant:Destroy() --Destroy it, boom
	end
end

Else if not you may need to change the parent to game and just loop through all the instances to check if they are of the same name, tedious but it will check more deeply.

2 Likes

I suggest using the Roblox Studio command line.

If the scripts have a distinct name and are copied of each other you can use the following script and run it in the command bar.


for i, v in pairs(workspace:GetDescendants()) do
    if v:IsA("thing") and v.Name == "thing" then
        v:Destroy()
    end
end```

Alternatively, you can use the game selection to select all the given objects, hope this helped!
1 Like

alright i see how it works, thx

1 Like

You can use the service Debris so you don’t get lots of errors message by the way. (A bit more interesting in the local side)

1 Like