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

How to make debris?

Asked by 9 years ago

What I want to happen is: When you touch the block, the block will disappear and an unanchored block will appear in its place and disappear after 5 seconds. The game output box doesn't say anything if I touch the block. The "Go to script error" button at the top also doesn't say anything.

local part = script.Parent
part.Touched:connect(function()
    game:GetService('Debris'):AddItem(Workspace.TestingTree.Part, 5)
    part.Visible = false
end)
wait(5)
part.Visible = true

Answer this question