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

How do I make a part disappear by clicking a button?

So I am trying to make a button disappear by clicking a text button. I tried making a script but it didn't work. Here's the script:

game.Workspace.Model.Textbutton
Mousebutton1click = game.Workspace.Droppers(destroy) 

Please reply

Thanks

1 answer

✓ Accepted answer
script.Parent.MouseButton1Click:connect(function()
game.Workspace.Part.Transparency = 1
end)

That simple. :) The first line is basically the function. If mouse button1 is clicked, it will fire the block of code under it.

** For the example shown above, I input the script into a local script whose parent is the Textbutton.

5 comments

0

thanks

0

Np.

0

but how would I destroy it instead of making it invisible

0

Oh, do

0

game.Workspace.Part:Destroy() instead of Part.Transparency

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