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

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

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
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.

0
thanks HiHowAreYah5 19 — 5y
0
Np. FadedJayden_Dev 118 — 5y
0
but how would I destroy it instead of making it invisible HiHowAreYah5 19 — 5y
0
Oh, do FadedJayden_Dev 118 — 5y
0
game.Workspace.Part:Destroy() instead of Part.Transparency FadedJayden_Dev 118 — 5y
Ad

Answer this question