If possible im looking for a part that serves as a button,when clicked with a mouse a decal on a part should turn from having transparency 1 to 0, and if clicked twice it should come back to normal. I have reserched on youtube and found out how to do this with a part but the decal on the part does not change transparency with it. Could any one help me with this?
✓ ANSWER ACCEPTED
How to make a button that when clicked changes the Transparency of a decal?
2 answers
✓ Accepted answer
You can try something like this:
local Button = script.Parent -- change this to where the button is located
local Decal = script.Parent.Parent.Decal -- change this to where the decal is located
Button.MouseButton1Down:Connect(function()
if Decal.Transparency == 1 then
Decal.Transparency = 0
elseif Decal.Transparency == 0 then
Decal.Transparency = 1
end
end)
Decals don't change transparency with their brick. You have to change the transparency of the decal itself. Just have the path point to the decal's transparency property.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Sory but could you explain if im duposed to delete the last parent and decal and put the model of the button and the part of the decal in there or if i just put them in front or if i should put the name of the button and not the model. If yo could explain i ould be tankfull and sory for spending your time
Put the script inside the button. Then locate the decal by using .Parent until you reach the correct, well- Parent.
If you're still confused, add my discord and I'll help you out. Josh K#2740
Tanks it worked, it finaly worked thanks so much