Hey i was wondering how i could delete half of theese.
inside a local script.
So only one player could see it destroyed
Hey i was wondering how i could delete half of theese.
In a local script:
local Folder = -- Path to folder here
local Children = #Folder:GetChildren()
local NumToDelete = math.round(Children / 2)
for i = 1, NumToDelete do
Folder:FindFirstChildOfClass("Part"):Destroy()
end
Try this.
local folder = workspace:WaitForChild("Folder")
for index, part in ipairs(folder:GetChildren()) do
if part:IsA("BasePart") then
if math.random() <= 0.5 then
part:Destroy()
end
end
end
For random deletion.