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

How do you make it when you use ClickDetector the block changes transparent each click?

like when you use a ClickDetector on a block and when you click it the transparent changes each time you click it.

I was thinking it was kinda script

script.Parent.ClickDetector.MouseClick:Connect(function()
        script.Parent.Transparency()
end)

Would be nice to fix, or make a script!

1 answer

✓ Accepted answer

Adding transparency:

script.Parent.Transparency = 0
script.Parent.ClickDetector.MouseClick:connect(function()
        script.Parent.Transparency = script.Parent.Transparency + 0.1
end)

Subtracting transparency:

script.Parent.Transparency = 1
script.Parent.ClickDetector.MouseClick:connect(function()
        script.Parent.Transparency = script.Parent.Transparency - 0.1
end)

If there are issues, please comment. If this helped, upvote and accept answer. Thank you!

1 comment

1

Thank you this worked! I would like it if you bump my question up! Only if you want, but thanks for the answer!

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