|
| 05 Jun 2016 11:10 AM |
I know I can just type out script.Parent.Transparency = 0.9 then 0.8 and so on but I'm trying to find a better way to do that
This is my script so far but it's not working. I know that the problem is likely in line 3 but I don't have any idea how I would write it out otherwise.
function click() for i = 1, 5 do script.Parent.Transparency = script.Parent.Transparency-.1 wait(1) end script.Parent.ClickDetector.MouseClick:connect(click) end |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:11 AM |
for i = 1,0,0.1 do script.Parent.Transparency = script.Parent.Transparency - i |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:11 AM |
for i = 0,1.,.1 do transparency = i wait() end
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:11 AM |
for i = 1,0,-0.1 do script.Parent.Transparency = script.Parent.Transparency - i end
-- Miss click, sorry |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:12 AM |
function click() for i = 0, 1, .2 do script.Parent.Transparency = i wait(1) end end script.Parent.ClickDetector.MouseClick:connect(click)
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:27 AM |
| Thanks everyone for the help |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:29 AM |
| Just to check. By saying i = 0,1,.2 am I saying i is equal to every number between 0 and 1 that is divisible by .2? |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2016 11:36 AM |
it's a loop
i, the variable, will go from 0 to 1 by an increment of 0.2
|
|
|
| Report Abuse |
|
|