1 | for i = 0 , 1 , . 01 do |
2 | ui.Transparency = i |
3 | wait() |
4 | end |
Please explain me how to write the code or give me the code.
You aren't looking for a click, you have to use a connect to do this:
1 | script.Parent.MouseButton 1 Click:connect( function () |
2 | for i = 0 , 1 , . 01 do |
3 | ui.Transparency = i |
4 | wait() |
5 | end |
6 | end ) |
This is what I changed:
1 | script.Parent.MouseButton 1 Click:connect( function () |
2 | -- code here |
3 | end ) |
you can also use this:
1 | function onClicked() |
2 |
3 | end |
4 |
5 | script.Parent.MouseButton 1 Click:connect(onClicked) -- what the function is named |
Hope this helped. Enjoy!