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)
`
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)
`
Try this:
script.Parent.Touched:connect(function()
script.Parent:remove()
end)
You need to give more explanation
'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.
1 comment
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.