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

Help with part:remove?

I don't know why this doesn't work can you help!?

`
part = script.Parent

function onTouched(hit)
	part:remove()
end

script.Parent.Touched:connect(onTouched)
`

1 comment

0

What is wrong exactly? What isn't working about it? Was there any Output? If so, what did it say? Your Question is too Vague; There is not enough information for us to exactly help you with your Problem/Question.

1 answer

✓ Accepted answer

Try this:

script.Parent.Touched:connect(function()
	script.Parent:remove()
end)

2 comments

0

You need to give more explanation

0

'remove' is Deprecated, please use 'AddItem' (a Method of Debris) or 'Destroy' (Something (almost) all Instances can use (E.x.: Child:Destroy())). Also, please do not simply post code; Explain the reason behind your answer, and what he had done wrong; Give some-sort of Explanation.

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