So, my builder used many free models and they contained the Fire Spread script. And I want to remove them but I am too lazy because there are too many.. I tried this script, but I don't know how I will complete it.
Script:
local descendants = game.Workspace:GetDescendants() for index, descendant in pairs(descendants) do if descendant.Name == "Fire" then end end
I don't know what a "Fire spread script" is, but I've seen things that sound similar. Try using this script instead, it should work to remove all the spammed objects, but it's untested.
function clean(name, path, otype) for i,v in pairs(path:GetChildren()) do if v:IsA(otype) == true and v.Name == name then if v:GetChildren() ~= nil then clean(name, v, otype) end v:Destroy() end end end
Now you just call the function with whatever parameters you want, because I don't know what the fire spread script is.
Side note: If your "developers" use free models, fire them.
EDIT: If you're asking how to complete that script, you can use the :Destroy() method to destroy the objects, or the :remove() method if you want to set their parent to nil.