Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What exactly is "Debris"?

Does game:GetService("Debris"):AddItem(workspace.Part, 10) create a part and remove it after 10 seconds or get an already exisiting part and remove it after 10 seconds? I already searched this topic on scripting helpers and somebody said that it removes an already existing part while another guy said it created one then remove it.

I'm confused

1 answer

✓ Accepted answer

No. it doesn't create a new part.

What game:GetService("Debris"):AddItem(workspace.Part, 10) does is wait 10 seconds then deletes the part. Debris is for removing objects from the DataModel after the specific amount of time

3 comments

0

Thanks.

1

Is there a way to add the item then remove it?

0

^ make a variable local p = Instance.new("Part") p.Parent = workspace game:GetService("Debris"):AddItem(p, 1) --Removes the part in one second. --[[Sorry for posting an answer on the comments admins.--]]

This discussion is preserved as it was. New answers, comments, and votes are closed.