Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to mass delete something?

Asked by 9 years ago

I have made a nice place, but some brick putted Infected weld in every single model and brick. How do I delete this fast? Or do I have to click on every thing an delete it one by one?

0
Try this plugin, it works pretty well. http://www.roblox.com/Ro-Defender-Plugin-v8-4-item?id=142273772 M39a9am3R 3210 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

You can create something like this:

local badNames = {"Infected", "TROLLSZOR", "U GETE POWNED NOOBLUNOOB"}

function isBadName(name)
if string.lower(table.concat(badNames, ' ')):match(name:lower()) then
return true
end
return false
end

for i, item1 in pairs(game.Workspace:children()) do
for i, item in pairs(item1:children()) do
if isBadName(item.Name) then
item:destroy()
end
end
end

(From the tip of the day today, they are extremely useful)

This script checks the children of all the items in the workspace. If any child's name is in the "badNames" table, that child will be deleted. Just add names to your liking in case there's any more viruses.

0
Wait, It doesn't really work... coolguy1v1 0 — 9y
0
Because I have ingame the same virus. coolguy1v1 0 — 9y
0
It would work in Edit mode, or in Play Solo when it's paused. Because if it's in play mode, or online mode, the virus script keeps running, thus constantly recreating itself. Tkdriverx 514 — 9y
0
So, If I play it in solo, or paused, it will be deleted for always, or will it still be inside the normal mode? coolguy1v1 0 — 9y
0
You will need to add the name of your "virus weld" into the table on line 1 as well, in case you haven't yet noticed. RoboFrog 400 — 9y
Ad

Answer this question