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

Disappear part someone? [closed]

Asked by 10 years ago

Can someone give me a link to a part that when you touch it disappear(?)

1
This isn't a request site. If you want to make requests, go to ROBLOX and post on LMAD forum, and put up a money reward. Vescatur 95 — 10y

Closed as Not Constructive by M39a9am3R, Shawnyg, and BlueTaslem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 10 years ago

If you want to make the part invisible when you touch it, use this:

function onTouched(part)
    script.Parent.Transparency = 1
end

script.Parent.Touched:connect(onTouched)

If you want to remove the part, you can do this:

function onTouched(part)
    script.Parent:remove()
end

script.Parent.Touched:connect(onTouched)
Ad
Log in to vote
0
Answered by
IcyEvil 260 Moderation Voter
10 years ago

while true do script.Parent.Touched:connect(function(hit) script.Parent.Transparency = "1" if script.Parent.Transparency = "1" then script.Parent.Transparency = "0" wait(1) end) end

-- put this script into a brick.