DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:26 PM |
--Isn't fading in right. --Not quite sure as to how to fix it.
part = script.Parent local oldtrans new = 1 oldtrans = part.Transparency/10 if part.Transparency == 0 then oldtrans = 0.1 end print('Start: '..new..' _ '..part.Name) part.Transparency = new for i=1, 10 do new = new - oldtrans part.Transparency = new wait(0.1) end print('End: '..new..' _ '..part.Name) |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:28 PM |
Getting some crazy output.
Start: 1 _ BasePlate End: 1.3877787807814e-016 _ BasePlate |
|
|
| Report Abuse |
|
|
bobalaka
|
  |
| Joined: 04 Nov 2009 |
| Total Posts: 249 |
|
|
| 10 Jun 2016 10:29 PM |
| How is it not fading in right? |
|
|
| Report Abuse |
|
|
bobalaka
|
  |
| Joined: 04 Nov 2009 |
| Total Posts: 249 |
|
|
| 10 Jun 2016 10:29 PM |
| It's working fine for me in studio. |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2016 10:32 PM |
This is a huge mess.
You could just do this:
while true do for i = 0.1, 1 do wait(0.1) script.Parent.Transparency = script.Parent.Transparency + 0.1 end for i = 0.1, 1 do wait(0.1) script.Parent.Transparency = script.Parent.Transparency - 0.1 end end
rad |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:33 PM |
Start: 1 _ BasePlate End: 1.3877787807814e-016 _ BasePlate
--Yea... no --That's not right... |
|
|
| Report Abuse |
|
|
bobalaka
|
  |
| Joined: 04 Nov 2009 |
| Total Posts: 249 |
|
|
| 10 Jun 2016 10:33 PM |
| He's not trying to do a loop, and I'm sure he's aware of an easier way to do it. |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:34 PM |
| No because It's for more then one part and any transparency. |
|
|
| Report Abuse |
|
|
bobalaka
|
  |
| Joined: 04 Nov 2009 |
| Total Posts: 249 |
|
| |
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:37 PM |
| Not sure why you post something that dose something completely different... |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:38 PM |
| Now could I get some real help? |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2016 10:46 PM |
for i = 0.1, 1 do wait(0.1) script.Parent.Transparency = script.Parent.Transparency + 0.1 end that's all you have to do for the transparency to do what your script does
BUT W.E
if you change the loop to only loop nine times, then the ending output will print 0.1.
i also made it print new each time it loops, but this time i changed it to loop 11 times. I found that on the tenth loop it printed 1.3877787807814e-016, BUT it would go to -0.1 on the 11th time.
so idk?
it's super weird
rad |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2016 10:51 PM |
Sigh.
for i = 1, 0, -0.025 do part.Transparency = i end
|
|
|
| Report Abuse |
|
|
|
| 10 Jun 2016 10:52 PM |
Whoops, add a wait() in right after the part.Transparency = i part.. heh.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 10 Jun 2016 10:52 PM |
@spooked, you must not understand the intention behind his code. He's not trying to go from 0 to 1 in 10 steps, he's trying to go from X to 1 in 10 steps, depending on the original transparency of the part.
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 10:56 PM |
| I've fixed the problem, thanks for trying guys. |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 10 Jun 2016 11:02 PM |
Had to change it around a bit so it's always - 0.1 and just get the times to loop from times trans.
Love how everyone didn't understand what the code did. xD |
|
|
| Report Abuse |
|
|