I wrote a script to make the other part transparent by clicking on part. But when I added a GUI to the part surface and added a button and added a script it didn't work. And I need help to make the script I wrote work when I press a button with Surface GUI
function TEST ()
game.Workspace.Part.Transparency = 1
end
game.Workspace.partt.ClickDetector.MouseClick:Connect(TEST)

5 comments
Let me know how it goes.
It didn't work with Surface GUI.
If it's a surface GUI then you shouldn't use a click detector but rather a TextButton or an ImageButton. Check my edit and let me know how it goes.
Thank. It's work
You're welcome :)