Please I need help with deleting all desks in workspace

0.5 I dont no how to do Delet all PartTest1

  1. What do you want to achieve? we have 10 part
    Helper 1
if game.workspace.PartTest1 = 10 then
PartTest1: all Destroy()
  1. What is the issue? I tried a lot through the nil
If PartTest = nill then
print ("wow EPIC")
else
wait(4)
Part:Delet()
end
end

But its not work
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I honestly searched but did not see. I need your help:)

2 Likes

Hello! Here, try this script:

Local Parts = game.workspace:GetChildren()

for P = 1, #Parts do
if Parts[P].Name == "PartTest1" then
Parts[P]:Destroy()
end
end

Dont work.They keep spawning and not being removed.

for _, v in next, workspace:GetDescendants() do
    if v.Name == "PartTest1" then
        v:Destroy() 
    end
end

Maybe me need change hare? @TKMDoge

while true do  
for _,  spawnArea in workspace.spawnArea:GetChildren() do
	for i =  1, 10, 1 do
		spawnDino(Dino, spawnArea)
			wait(2)
			end
	end
end

Can you try to help if you write this then why are you here at all?

Try making a folder for the parts. Basically, when they spawn, parent them to the folder, then use a for loop to cycle through them. You can click the links below to learn about them!

For Loops Introduction
Video Explaination

1 Like

Everyone starts somewhere, the point of this forum is to get help with problems

the guy is purposefully writing in broken english

Or… english isn’t his first language/He is young?

the post history is proving otherwise

For people like you, I write in broken English, if I write in my native language, you will not understand anything or you will use google translator

1 Like

Thank you, I’m going to bed right now, but tomorrow I’ll study the material and try to solve this problem

1 Like

Good luck! I hope you get it working :+1:

1 Like

Here, try this script and it will work for sure
It’s a serverscript (normal script not local script)

local TimeForRemove = 1
local TimeForCheckForPart = 5

while wait(TimeForCheckForPart) do

for i, v in pairs(game.Workspace:GetDescendants()) do
if v.Name == "PartTest1"  then
game.Debris:AddItem(v, TimeForRemove)

end
end
end

Place the script in workspace

1 Like

lmao yall just giving him free scripts ok :skull:

What do you mean bro?
I made it with my mobile and helping is something belongs to me

the funny thing is that I already made a script and just now I saw your help But I’ll mark yours as the answer. Thanks for the help! I like people like you

Well, here the choice of each Scenario is not big,

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.