generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Fade In

Previous Thread :: Next Thread 
DevVince is not online. 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 is not online. 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 is not online. bobalaka
Joined: 04 Nov 2009
Total Posts: 249
10 Jun 2016 10:29 PM
How is it not fading in right?
Report Abuse
bobalaka is not online. bobalaka
Joined: 04 Nov 2009
Total Posts: 249
10 Jun 2016 10:29 PM
It's working fine for me in studio.
Report Abuse
GetSporked is not online. GetSporked
Joined: 05 Jul 2012
Total Posts: 7972
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 is not online. 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 is not online. 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 is not online. 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 is not online. bobalaka
Joined: 04 Nov 2009
Total Posts: 249
10 Jun 2016 10:35 PM
Exactly.
Report Abuse
DevVince is not online. 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 is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
10 Jun 2016 10:38 PM
Now could I get some real help?
Report Abuse
GetSporked is not online. GetSporked
Joined: 05 Jul 2012
Total Posts: 7972
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
Queen_Azshara is not online. Queen_Azshara
Joined: 08 Jun 2016
Total Posts: 5
10 Jun 2016 10:51 PM
Sigh.

for i = 1, 0, -0.025 do
part.Transparency = i
end


Report Abuse
Queen_Azshara is not online. Queen_Azshara
Joined: 08 Jun 2016
Total Posts: 5
10 Jun 2016 10:52 PM
Whoops, add a wait() in right after the part.Transparency = i part.. heh.


Report Abuse
Soybeen is not online. 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 is not online. 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 is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
10 Jun 2016 10:56 PM
What was the issue?


Report Abuse
DevVince is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image